/* Decentralized Trust Attorneys — Demo Theme
   Palette: navy #0f172a / #020617, gold #f59e0b, slate grays, cream bg
   Type: Playfair Display (headings), Plus Jakarta Sans (body) */

:root {
  --navy: #0f172a;
  --navy-dark: #020617;
  --gold: #f59e0b;
  --gold-dark: #b45309;
  --cream: #f8fafc;
  --ink: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --green: #15803d;
  --red: #b91c1c;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
}
h1, h2, h3, h4 { font-family: 'Playfair Display', Georgia, serif; margin: 0 0 .4em; color: var(--navy); line-height: 1.2; }
p { margin: 0 0 1em; color: var(--muted); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 8px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: #1e2b47; }
.btn-gold { background: var(--gold); color: #1a1203; }
.btn-gold:hover { background: #e08e0b; }
.btn-outline { background: transparent; border-color: var(--line); color: var(--navy); }
.btn-outline:hover { border-color: var(--navy); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* Top nav */
.topnav {
  position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid var(--line);
}
.topnav .container { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--navy); }
.brand .mark {
  width: 34px; height: 34px; border-radius: 8px; background: var(--navy);
  display: flex; align-items: center; justify-content: center; color: var(--gold); font-size: 16px;
}
.nav-links { display: flex; gap: 28px; font-size: 15px; color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 12px; }

/* Hero */
.hero {
  background: linear-gradient(180deg, var(--navy-dark), var(--navy) 70%);
  color: #fff; padding: 90px 0 60px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
  color: var(--gold); background: rgba(245, 158, 11, .12); border: 1px solid rgba(245, 158, 11, .3);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 { color: #fff; font-size: 46px; max-width: 720px; }
.hero h1 .accent { color: var(--gold); }
.hero p.lead { color: #cbd5e1; max-width: 560px; font-size: 17px; }
.hero-actions { display: flex; gap: 14px; margin: 28px 0 46px; }
.stat-row { display: flex; gap: 56px; border-top: 1px solid rgba(255,255,255,.12); padding-top: 28px; }
.stat-row .num { font-family: 'Playfair Display', serif; font-size: 30px; color: #fff; }
.stat-row .label { font-size: 13px; color: #94a3b8; }

/* Sections */
.section { padding: 76px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-alt { background: #eef2f7; }

/* Cards */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.card h3 { font-size: 18px; margin-bottom: 8px; }
.card p { font-size: 14.5px; margin-bottom: 16px; }
.icon-badge {
  width: 42px; height: 42px; border-radius: 9px; background: #eef2f7;
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px; font-size: 18px;
}

/* Pick cards (entity type selection) */
.pick-card {
  border: 2px solid var(--line); border-radius: var(--radius); padding: 24px; cursor: pointer;
  background: #fff; transition: border-color .15s ease, background .15s ease; position: relative;
}
.pick-card.selected { border-color: var(--navy); background: #f4f6fa; }
.pick-card .check {
  position: absolute; top: 20px; right: 20px; width: 22px; height: 22px; border-radius: 999px;
  border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 12px;
}
.pick-card.selected .check { background: var(--navy); border-color: var(--navy); color: #fff; }

/* Testimonials */
.testimonial .stars { color: var(--gold); font-size: 14px; margin-bottom: 10px; letter-spacing: 2px; }
.testimonial blockquote { font-style: italic; color: var(--ink); margin: 0 0 16px; font-size: 15px; }
.testimonial .who { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 36px; height: 36px; border-radius: 999px; background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px;
}
.who .name { font-weight: 700; font-size: 14px; color: var(--navy); }
.who .role { font-size: 12.5px; color: var(--muted); }

/* Footer */
.footer { background: #eef2f7; border-top: 1px solid var(--line); padding: 56px 0 24px; }
.footer .grid-4 { grid-template-columns: 2fr 1fr 1fr 1fr; }
.footer h4 { font-size: 14px; color: var(--navy); margin-bottom: 14px; }
.footer a { display: block; font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.footer a:hover { color: var(--navy); }
.footer-bottom {
  border-top: 1px solid var(--line); margin-top: 36px; padding-top: 20px;
  display: flex; justify-content: space-between; font-size: 13px; color: var(--muted);
}
.contact-line { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 10px; }

/* Auth card */
.auth-wrap { min-height: calc(100vh - 73px); display: flex; align-items: center; justify-content: center; background: var(--cream); padding: 60px 20px; }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 40px; width: 100%; max-width: 420px; }
.auth-card h2 { text-align: center; }
.auth-sub { text-align: center; margin-bottom: 22px; }
.tabs { display: flex; background: #eef2f7; border-radius: 8px; padding: 4px; margin-bottom: 24px; }
.tabs a { flex: 1; text-align: center; padding: 9px; border-radius: 6px; font-weight: 600; font-size: 14px; color: var(--muted); }
.tabs a.active { background: #fff; color: var(--navy); box-shadow: var(--shadow); }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; font-size: 14.5px;
  font-family: inherit; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--navy); outline-offset: 1px; }
.help-link { text-align: center; font-size: 13.5px; color: var(--muted); margin-top: 16px; }
.help-link a { color: var(--navy); font-weight: 600; }

.alert { padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 18px; }
.alert-success { background: #dcfce7; color: #15803d; }
.alert-error { background: #fee2e2; color: #b91c1c; }
.alert-info { background: #dbeafe; color: #1d4ed8; }

/* Application flow */
.steps { display: flex; justify-content: center; gap: 10px; margin-bottom: 40px; }
.step-dot { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.step-dot .n {
  width: 26px; height: 26px; border-radius: 999px; background: #e2e8f0; color: var(--muted);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12.5px;
}
.step-dot.active .n { background: var(--navy); color: #fff; }
.step-dot.done .n { background: var(--green); color: #fff; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; max-width: 640px; margin: 0 auto; box-shadow: var(--shadow); }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.review-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.review-row .k { color: var(--muted); }
.review-row .v { font-weight: 600; color: var(--ink); }

/* Dashboard */
.dash-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; flex-wrap: wrap; gap: 12px; }
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); box-shadow: var(--shadow); }
.table-wrap .table { box-shadow: none; border-radius: 0; min-width: 640px; }
.table th, .table td { padding: 14px 16px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--line); }
.table th { background: #f4f6fa; color: var(--muted); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em; }
.table tr:last-child td { border-bottom: none; }
.badge { padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; display: inline-block; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); background: #fff; border-radius: var(--radius); border: 1px dashed var(--line); }

/* Admin layout */
.admin-shell { display: flex; min-height: 100vh; }
.admin-side { width: 240px; background: var(--navy-dark); color: #cbd5e1; flex-shrink: 0; padding: 22px 16px; }
.admin-side .brand { color: #fff; padding: 0 8px 24px; }
.admin-side nav a { display: block; padding: 10px 12px; border-radius: 8px; font-size: 14px; margin-bottom: 2px; color: #cbd5e1; }
.admin-side nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-side nav a.active { background: var(--gold); color: #1a1203; font-weight: 700; }
.admin-main { flex: 1; background: var(--cream); padding: 32px 36px; min-width: 0; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }

/* Dark override for Crypto Assets page */
body.ca-page .admin-main { background: #0f172a; }
body.ca-page .admin-topbar h2 { color: #f1f5f9; }
body.ca-page .admin-topbar { color: #94a3b8; }
body.ca-page .admin-topbar strong { color: #e2e8f0 !important; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px; margin-bottom: 20px; }
.kpi-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.kpi-icon { width: 34px; height: 34px; border-radius: 8px; background: #eef2f7; display: flex; align-items: center; justify-content: center; font-size: 15px; margin-bottom: 10px; }
.kpi-card .num { font-family: 'Playfair Display', serif; font-size: 30px; color: var(--navy); }
.kpi-card .label { font-size: 13px; color: var(--muted); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.filters { display: flex; gap: 10px; margin-bottom: 18px; }
.filters a { padding: 7px 14px; border-radius: 999px; font-size: 13.5px; border: 1px solid var(--line); color: var(--muted); }
.filters a.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 6px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.detail-grid .k { font-size: 12.5px; text-transform: uppercase; color: var(--muted); letter-spacing: .03em; margin-bottom: 3px; }
.detail-grid .v { font-size: 15px; color: var(--ink); font-weight: 600; }

/* Crypto ticker */
.ticker-bar {
  background: var(--navy-dark); border-radius: var(--radius); padding: 14px 18px;
  display: flex; flex-wrap: wrap; gap: 24px; margin-bottom: 24px;
}
.ticker-item { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: #cbd5e1; }
.ticker-sym { font-weight: 700; color: #fff; }
.ticker-price { color: #e2e8f0; }
.ticker-change.up { color: #4ade80; }
.ticker-change.down { color: #f87171; }

/* Balance card */
.balance-card {
  background: linear-gradient(135deg, var(--navy), var(--navy-dark)); color: #fff;
  border-radius: var(--radius); padding: 26px 28px; margin-bottom: 24px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
}
.balance-card .label { font-size: 13px; color: #94a3b8; margin-bottom: 6px; }
.balance-card .amount { font-family: 'Playfair Display', serif; font-size: 34px; color: var(--gold); }

/* File input */
.field input[type=file] { padding: 9px; background: #fff; }
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.section-divider { border: none; border-top: 1px solid var(--line); margin: 30px 0; }
.section-label { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.section-label .n { width: 26px; height: 26px; border-radius: 999px; background: #e2e8f0; color: var(--navy); font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.section-label h3 { margin: 0; }
.conditional-field { border-left: 3px solid var(--gold); padding-left: 14px; background: #fffbeb; border-radius: 0 8px 8px 0; padding-top: 10px; padding-bottom: 2px; }

@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .footer .grid-4 { grid-template-columns: 1fr 1fr; row-gap: 28px; }
  .nav-links { display: none; }
  .hero h1 { font-size: 34px; }
  .stat-row { gap: 30px; flex-wrap: wrap; }
  .admin-side { display: none; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .form-row-2 { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
}

/* Client dashboard sidebar (wallet-style, reuses .admin-shell/.admin-side/.admin-main) */
.side-user { display: flex; align-items: center; gap: 12px; padding: 14px 8px 20px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 14px; }
.side-avatar {
  width: 40px; height: 40px; border-radius: 999px; background: var(--gold); color: #1a1203;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; flex-shrink: 0;
}
.side-name { color: #fff; font-weight: 700; font-size: 14px; line-height: 1.3; }
.side-balance { color: var(--gold); font-size: 13px; font-weight: 600; }
.nav-heading { color: #64748b; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 14px 12px 6px; }
.nav-heading:first-child { padding-top: 0; }

/* Wallet quick actions row (on the balance card) */
.quick-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.qa-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 68px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 10px;
  padding: 10px 12px; font-size: 12.5px; font-weight: 600; color: #fff; transition: background .12s ease;
}
.qa-btn:hover { background: rgba(255,255,255,.16); }
.qa-icon { font-size: 17px; color: var(--gold); }

/* Transaction ledger list (dashboard overview) */
.tx-list { display: flex; flex-direction: column; }
.tx-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tx-row:last-child { border-bottom: none; }
.tx-dot { width: 9px; height: 9px; border-radius: 999px; flex-shrink: 0; }
.tx-dot.tx-up, .tx-amount.tx-up { color: #15803d; }
.tx-dot.tx-up { background: #15803d; }
.tx-dot.tx-down, .tx-amount.tx-down { color: #b91c1c; }
.tx-dot.tx-down { background: #b91c1c; }
.tx-dot.tx-neutral, .tx-amount.tx-neutral { color: var(--muted); }
.tx-dot.tx-neutral { background: var(--muted); }
.tx-main { flex: 1; min-width: 0; }
.tx-title { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.tx-sub { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.tx-amount { font-weight: 700; font-size: 14.5px; white-space: nowrap; }

/* Receive page */
.qr-wrap { display: flex; justify-content: center; margin-bottom: 22px; }
.qr-wrap img { border-radius: 10px; border: 1px solid var(--line); padding: 10px; background: #fff; }
.address-box {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #f4f6fa; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px;
  font-family: 'Courier New', monospace; font-size: 13px; word-break: break-all;
}

@media (max-width: 900px) {
  .dash-side { display: none; }
  .quick-actions { width: 100%; justify-content: space-between; }
  .qa-btn { flex: 1; min-width: 0; }
  .admin-main { padding-bottom: 88px; }
}

/* Mobile bottom tab bar (client wallet dashboard) */
.mobile-tabbar { display: none; }
@media (max-width: 900px) {
  .mobile-tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: var(--navy-dark); border-top: 1px solid rgba(255,255,255,.08);
    padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
  }
  .mobile-tabbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    font-size: 10.5px; font-weight: 600; color: #94a3b8; padding: 4px 2px;
  }
  .mobile-tabbar a.active { color: var(--gold); }
  .mt-icon { font-size: 18px; }
}

/* Profile "More" menu list */
.more-list { display: flex; flex-direction: column; }
.more-item {
  display: flex; align-items: center; gap: 12px; padding: 15px 6px; font-size: 15px; font-weight: 600;
  color: var(--ink); border-bottom: 1px solid var(--line);
}
.more-item:last-child { border-bottom: none; }
.more-item span { font-size: 17px; width: 22px; text-align: center; }

/* Wallet Management — provider grid + link modal */
.provider-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(152px, 1fr)); gap: 14px;
}
.provider-card {
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
  border: 1px solid var(--line); border-radius: 16px; padding: 22px 12px 18px; cursor: pointer;
  background: #fff; transition: transform .18s cubic-bezier(.2,.8,.2,1), border-color .18s ease, box-shadow .18s ease;
  font-size: 13px; font-weight: 700; color: var(--ink); position: relative; overflow: hidden;
}
.provider-card::before {
  content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity .18s ease;
  background: linear-gradient(180deg, rgba(15,23,42,.03), rgba(15,23,42,0) 60%);
}
.provider-card:hover {
  border-color: transparent; box-shadow: 0 14px 30px -12px rgba(15,23,42,.28), 0 0 0 1px rgba(15,23,42,.06);
  transform: translateY(-3px);
}
.provider-card:hover::before { opacity: 1; }
.provider-card:active { transform: translateY(-1px); }
.provider-card .wallet-name { line-height: 1.25; }
.provider-card .wallet-tag {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); opacity: .75;
}

/* Premium gradient logo badge (brand-flavored monogram, not a copied logo) */
.wallet-logo {
  width: 56px; height: 56px; border-radius: 18px; flex-shrink: 0; position: relative;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 17px; letter-spacing: .01em;
  box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 -10px 18px -8px rgba(0,0,0,.35) inset, 0 8px 16px -6px rgba(15,23,42,.35);
}
.wallet-logo::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.35), rgba(255,255,255,0) 45%);
}
.wallet-logo.sm { width: 44px; height: 44px; font-size: 14px; border-radius: 13px; }
.wallet-logo.lg { width: 72px; height: 72px; font-size: 22px; border-radius: 22px; }
.address-box .wallet-logo { margin-right: 2px; }

.wallet-modal-overlay {
  position: fixed; inset: 0; background: rgba(2, 6, 23, .6); backdrop-filter: blur(2px); z-index: 100;
  align-items: center; justify-content: center; padding: 20px;
}
.wallet-modal {
  background: #fff; border-radius: 20px; padding: 28px; width: 100%; max-width: 420px;
  box-shadow: 0 30px 60px -20px rgba(2,6,23,.45); animation: walletModalIn .18s cubic-bezier(.2,.8,.2,1);
}
@keyframes walletModalIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.wallet-modal-head { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.wallet-modal-head .wallet-logo { box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 8px 20px -8px rgba(15,23,42,.4); }

/* ── Crypto Assets portfolio page — dark CryptoRepublic style ── */

/* Top action bar: Buy / Receive / Send / Sell */
.ca-action-bar {
  display: flex; gap: 10px; margin-bottom: 18px; overflow-x: auto;
  padding-bottom: 2px; -webkit-overflow-scrolling: touch;
}
.ca-action-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: 999px; font-size: 14px; font-weight: 600;
  text-decoration: none; white-space: nowrap; flex-shrink: 0;
  transition: opacity .15s, transform .1s;
}
.ca-action-btn:active { opacity: .8; transform: scale(.97); }
.ca-action-icon { font-size: 16px; line-height: 1; }
.ca-action-buy     { background: #7c3aed; color: #fff; }
.ca-action-receive { background: #1e293b; color: #e2e8f0; border: 1px solid #334155; }
.ca-action-send    { background: #1e293b; color: #e2e8f0; border: 1px solid #334155; }
.ca-action-sell    { background: #1e293b; color: #e2e8f0; border: 1px solid #334155; }

/* Asset list wrapper */
.ca-asset-list {
  display: flex; flex-direction: column; gap: 10px;
}

/* Each coin card — dark pill */
a.ca-asset-row {
  display: flex; align-items: center; justify-content: space-between;
  background: #1a2235; border: 1px solid #283148; border-radius: 18px;
  padding: 14px 18px; text-decoration: none; color: inherit;
  transition: background .13s, transform .1s;
}
a.ca-asset-row:hover  { background: #1f2b40; }
a.ca-asset-row:active { transform: scale(.99); }

/* Left side */
.ca-asset-left  { display: flex; align-items: center; gap: 13px; flex: 1; min-width: 0; }
.ca-asset-icon  {
  width: 46px; height: 46px; border-radius: 999px; overflow: hidden; flex-shrink: 0;
  background: #0f172a; display: flex; align-items: center; justify-content: center;
  border: 1.5px solid #2d3f5e;
}
.ca-asset-icon img { width: 46px; height: 46px; object-fit: cover; }
.ca-asset-icon-fallback {
  width: 46px; height: 46px; border-radius: 999px; background: #0f172a;
  color: #94a3b8; font-weight: 800; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.ca-asset-info  { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ca-asset-name  { font-size: 15px; font-weight: 700; color: #f1f5f9; white-space: nowrap; }
.ca-asset-sub   { display: flex; align-items: center; gap: 7px; font-size: 12.5px; }
.ca-price       { color: #94a3b8; }
.ca-change-up   { color: #4ade80; font-weight: 600; }
.ca-change-down { color: #f87171; font-weight: 600; }

/* Right side */
.ca-asset-right     { text-align: right; flex-shrink: 0; margin-left: 10px; }
.ca-asset-coinamt   { font-size: 14px; font-weight: 700; color: #f1f5f9; }
.ca-asset-usd       { font-size: 13px; color: #64748b; margin-top: 3px; font-weight: 500; }

@media (max-width: 500px) {
  .ca-asset-row   { padding: 12px 14px; border-radius: 16px; }
  .ca-asset-icon  { width: 40px; height: 40px; }
  .ca-asset-icon img { width: 40px; height: 40px; }
  .ca-asset-name  { font-size: 14px; }
  .ca-action-btn  { padding: 9px 15px; font-size: 13px; }
}

/* ── Coin Detail page ── */
.cd-back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; color: var(--navy);
  padding: 6px 0; transition: color .12s;
}
.cd-back-btn:hover { color: var(--gold); }
.cd-back-arrow { font-size: 18px; }

.cd-hero {
  background: linear-gradient(160deg, var(--navy-dark) 0%, #0d1f3c 100%);
  border-radius: var(--radius); padding: 22px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.cd-hero-left { display: flex; align-items: center; gap: 16px; }
.cd-coin-icon {
  width: 56px; height: 56px; border-radius: 999px; overflow: hidden; flex-shrink: 0;
  background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255,255,255,.12);
}
.cd-coin-icon img { width: 56px; height: 56px; object-fit: cover; }
.cd-coin-icon-fallback {
  width: 56px; height: 56px; border-radius: 999px;
  background: var(--gold); color: #1a1203;
  font-weight: 800; font-size: 15px;
  align-items: center; justify-content: center;
}
.cd-coin-name   { font-size: 20px; font-weight: 800; color: #fff; line-height: 1.2; }
.cd-coin-ticker { font-size: 12.5px; color: #94a3b8; margin-top: 3px; }

.cd-hero-right { text-align: right; }
.cd-live-price {
  font-family: 'Playfair Display', serif; font-size: 24px;
  color: var(--gold); font-weight: 700;
}
.cd-price-change { font-size: 12.5px; font-weight: 700; margin-top: 4px; }
.cd-price-change.up   { color: #4ade80; }
.cd-price-change.down { color: #f87171; }

.cd-balance-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 24px; margin-bottom: 18px; box-shadow: var(--shadow);
}
.cd-balance-label  { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; font-weight: 700; }
.cd-balance-amount { font-family: 'Playfair Display', serif; font-size: 30px; color: var(--navy); font-weight: 700; }
.cd-balance-sub    { font-size: 12px; color: #94a3b8; margin-top: 4px; }

/* 4-button action row */
.cd-actions {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 4px;
}
.cd-action-btn {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 8px 14px; font-size: 13px; font-weight: 700; color: var(--ink);
  box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.cd-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -8px rgba(15,23,42,.22);
  border-color: var(--navy);
}
.cd-action-icon {
  width: 42px; height: 42px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 900;
}
.cd-send     { background: #dbeafe; color: #1d4ed8; }
.cd-receive  { background: #dcfce7; color: #15803d; }
.cd-swap     { background: #fef3c7; color: #92400e; }
.cd-withdraw { background: #fee2e2; color: #b91c1c; }

/* (ca-asset-row now defined in the Crypto Assets section above) */

@media (max-width: 500px) {
  .cd-actions { grid-template-columns: repeat(4,1fr); gap: 8px; }
  .cd-action-btn { padding: 14px 4px 10px; font-size: 11px; }
  .cd-action-icon { width: 34px; height: 34px; font-size: 15px; }
  .cd-live-price { font-size: 18px; }
  .cd-hero { padding: 16px; }
  .cd-coin-name { font-size: 17px; }
}

/* ── Add Demo Balance panel (coin-detail.php) ───────────────────────────────── */
.cd-add-balance-panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; margin-top: 18px; box-shadow: var(--shadow);
}
.cd-add-balance-title {
  font-size: 15px; font-weight: 800; color: var(--navy); margin-bottom: 6px;
}
.cd-add-balance-sub {
  font-size: 13px; color: var(--muted); margin-bottom: 14px; line-height: 1.6;
}
.cd-add-balance-form { display: flex; flex-direction: column; gap: 10px; }
.cd-input-group {
  display: flex; align-items: center;
  border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden;
  background: #f8fafc; transition: border-color .2s;
}
.cd-input-group:focus-within { border-color: var(--navy); background: #fff; }
.cd-input-prefix {
  padding: 0 12px; font-size: 17px; font-weight: 700; color: var(--muted);
  background: transparent; user-select: none;
}
.cd-usd-input {
  flex: 1; border: none; outline: none; background: transparent;
  padding: 13px 12px 13px 0; font-size: 16px; font-weight: 600; color: var(--navy);
}
.cd-calc-preview {
  font-size: 13px; color: #6366f1; font-weight: 600; padding: 2px 0;
}
.cd-add-btn {
  background: var(--navy); color: #fff; border: none; border-radius: 10px;
  padding: 13px 20px; font-size: 14px; font-weight: 700; cursor: pointer;
  transition: background .2s, transform .15s;
}
.cd-add-btn:hover:not(:disabled)  { background: #1e3a5f; transform: translateY(-1px); }
.cd-add-btn:disabled { opacity: .6; cursor: not-allowed; }
.cd-success-msg {
  background: #f0fdf4; border: 1px solid #86efac; border-radius: 8px;
  padding: 10px 14px; font-size: 13px; font-weight: 700; color: #15803d;
  margin-bottom: 8px;
}

/* ── Portfolio total bar (crypto-assets.php) ────────────────────────────────── */
.ca-portfolio-total-bar {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  border-radius: 14px; padding: 16px 20px; margin-bottom: 14px;
}
.ca-ptotal-label { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: #94a3b8; font-weight: 700; }
.ca-ptotal-amt   { font-family: 'Playfair Display', serif; font-size: 22px; color: var(--gold); font-weight: 700; }

/* ── Asset rows with balance highlight ─────────────────────────────────────── */
.ca-row-has-balance { border-left: 3px solid #4ade80; }
.ca-has-bal         { color: #15803d !important; font-weight: 700 !important; }
