.assets-page { background: var(--bg); }

.assets-header { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line-soft); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(16px); }
.assets-header-inner { max-width: 1240px; height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 0 auto; padding: 0 24px; }
.assets-brand { display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.assets-brand .brand-mark { width: 38px; height: 38px; }
.assets-brand b { display: block; font-size: 18px; letter-spacing: -.03em; }
.assets-brand small { display: block; margin-top: 1px; color: var(--ink-3); font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.assets-header-actions { display: flex; align-items: center; gap: 9px; }
.dashboard-link { height: 38px; display: inline-flex; align-items: center; gap: 7px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink-2); background: var(--surface); box-shadow: var(--shadow); font-size: 12px; font-weight: 750; text-decoration: none; transition: .2s ease; }
.dashboard-link:hover { color: var(--brand); border-color: var(--brand); }
.dashboard-link svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.assets-main { width: min(1240px, calc(100% - 48px)); margin: 0 auto; padding: 30px 0 46px; }
.assets-hero { min-height: 205px; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; padding: 38px 46px; border-radius: 18px; color: #fff; background: linear-gradient(125deg, #2563eb, #173a8f 62%, #111f4b); box-shadow: 0 20px 46px rgba(37, 99, 235, .2); }
.assets-hero::after { content: ""; position: absolute; width: 320px; height: 320px; right: -70px; top: -140px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 50%; box-shadow: 0 0 0 52px rgba(255, 255, 255, .025), 0 0 0 104px rgba(255, 255, 255, .018); }
.assets-hero > div { position: relative; z-index: 1; }
.assets-hero .eyebrow { color: #b7cbff; }
.assets-hero h1 { margin: 9px 0 0; font-size: clamp(30px, 4vw, 45px); line-height: 1.15; letter-spacing: -.05em; }
.assets-hero h1 span { color: #93b3ff; }
.assets-hero p:last-child { margin: 14px 0 0; color: rgba(255, 255, 255, .72); font-size: 14px; }
.assets-hero-mark { width: 112px; height: 112px; flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; margin-right: 7%; border: 1px solid rgba(255, 255, 255, .18); border-radius: 50%; background: rgba(255, 255, 255, .09); box-shadow: inset 0 0 0 10px rgba(255, 255, 255, .025); }
.assets-hero-mark strong { font-size: 35px; line-height: 1; }
.assets-hero-mark span { margin-top: 6px; color: rgba(255, 255, 255, .58); font-size: 9px; font-weight: 800; letter-spacing: .13em; }

.asset-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.asset-stats article { min-width: 0; min-height: 88px; display: flex; align-items: center; gap: 13px; padding: 17px 19px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.stat-icon { width: 39px; height: 39px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; }
.stat-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.stat-icon.blue { color: var(--brand); background: var(--brand-soft); }
.stat-icon.green { color: var(--profit); background: var(--profit-soft); }
.stat-icon.violet { color: var(--violet); background: color-mix(in srgb, var(--violet) 12%, transparent); }
.stat-icon.amber { color: var(--warning); background: var(--warning-soft); }
.asset-stats article div > span { display: block; color: var(--ink-3); font-size: 11px; font-weight: 700; }
.asset-stats strong { display: block; margin-top: 4px; overflow: hidden; font-size: 18px; text-overflow: ellipsis; white-space: nowrap; }

.asset-catalogue { margin-top: 18px; padding: 27px; }
.catalogue-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line-soft); }
.catalogue-heading .eyebrow { margin-bottom: 5px; }
.catalogue-heading h2 { margin: 0; font-size: 19px; letter-spacing: -.03em; }
.catalogue-actions { display: flex; align-items: center; gap: 10px; }
.catalogue-actions > p { margin: 0; color: var(--ink-3); font-size: 12px; }
.asset-manage-button { height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink-2); background: var(--surface-2); font-size: 11px; font-weight: 750; transition: .2s ease; }
.asset-manage-button:hover, .asset-manage-button.active { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
.asset-manage-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.asset-management-bar { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; padding: 10px 12px 10px 15px; border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--line)); border-radius: 10px; background: var(--brand-soft); }
.asset-management-bar[hidden] { display: none; }
.asset-management-bar > div { display: flex; align-items: center; gap: 8px; }
.asset-management-bar strong { color: var(--brand); font-size: 12px; }
.asset-management-bar span:last-child { color: var(--ink-2); font-size: 11px; }
.management-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--profit); box-shadow: 0 0 0 4px color-mix(in srgb, var(--profit) 14%, transparent); }
.asset-add-button, .asset-exit-button { height: 32px; padding: 0 11px; border-radius: 7px; font-size: 10px; font-weight: 750; }
.asset-add-button { border: 0; color: #fff; background: var(--brand); }
.asset-add-button:hover { background: var(--brand-2); }
.asset-exit-button { border: 1px solid var(--line); color: var(--ink-2); background: var(--surface); }
.asset-toolbar { display: grid; grid-template-columns: minmax(220px, 1fr) auto 180px; gap: 11px; margin-top: 20px; }
.asset-search { height: 43px; display: flex; align-items: center; gap: 9px; padding: 0 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); transition: .2s ease; }
.asset-search:focus-within { border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 3px var(--brand-soft); }
.asset-search svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: var(--ink-3); stroke-width: 1.8; stroke-linecap: round; }
.asset-search input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 13px; }
.asset-search input::placeholder { color: var(--ink-3); }
.asset-type-filter { height: 43px; display: flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.asset-type-filter button { min-width: 72px; padding: 0 12px; border: 0; border-radius: 6px; color: var(--ink-3); background: transparent; font-size: 11px; font-weight: 750; }
.asset-type-filter button.active { color: #fff; background: var(--brand); box-shadow: 0 4px 10px rgba(37, 99, 235, .16); }
.asset-sort { height: 43px; padding: 0 34px 0 12px; outline: 0; border: 1px solid var(--line); border-radius: 9px; color: var(--ink-2); background: var(--surface-2); font-size: 11px; font-weight: 700; cursor: pointer; }
.asset-sort:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

.asset-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-top: 20px; }
.asset-card { min-width: 0; min-height: 218px; position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 19px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface-2); transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.asset-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--asset-color); opacity: .85; }
.asset-card:hover { border-color: color-mix(in srgb, var(--asset-color) 45%, var(--line)); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(15, 23, 42, .07); }
.asset-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.asset-identity { min-width: 0; display: flex; align-items: center; gap: 11px; }
.asset-ticker { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 11px; color: #fff; background: var(--asset-color); font-size: 11px; font-weight: 850; letter-spacing: -.02em; }
.asset-name { min-width: 0; }
.asset-name strong { display: block; font-size: 14px; }
.asset-name span { display: block; margin-top: 4px; overflow: hidden; color: var(--ink-3); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.asset-kind { flex: 0 0 auto; padding: 5px 7px; border-radius: 6px; color: var(--brand); background: var(--brand-soft); font-size: 9px; font-weight: 800; }
.asset-card-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 5px; }
.asset-delete-button { width: 25px; height: 25px; display: grid; place-items: center; padding: 0 0 2px; border: 1px solid color-mix(in srgb, var(--loss) 28%, var(--line)); border-radius: 6px; color: var(--loss); background: var(--loss-soft); font-size: 17px; line-height: 1; transition: .2s ease; }
.asset-delete-button:hover { color: #fff; border-color: var(--loss); background: var(--loss); }
.asset-delete-button:disabled { cursor: wait; opacity: .6; }
.asset-description { min-height: 42px; margin: 16px 0 14px; color: var(--ink-2); font-size: 12px; line-height: 1.65; }
.asset-card-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: auto; padding-top: 13px; border-top: 1px solid var(--line); }
.asset-card-stats span { display: block; color: var(--ink-3); font-size: 9px; }
.asset-card-stats strong { display: block; margin-top: 5px; overflow: hidden; color: var(--ink-2); font-size: 12px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.asset-card-stats strong.asset-yield { color: var(--profit); }
.asset-card.is-high-risk .asset-kind { color: var(--loss); background: var(--loss-soft); }
.asset-card.is-high-risk .asset-card-stats strong.asset-yield { color: var(--loss); }
.asset-loading { grid-column: 1 / -1; min-height: 240px; display: grid; place-items: center; color: var(--ink-3); font-size: 13px; }
.asset-empty { min-height: 230px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--ink-3); }
.asset-empty strong { color: var(--ink-2); font-size: 15px; }
.asset-empty span { margin-top: 7px; font-size: 12px; }
.assets-footer { display: flex; justify-content: space-between; gap: 25px; padding: 24px 3px 0; color: var(--ink-3); font-size: 10px; }
.assets-footer p { margin: 0; }

.asset-dialog { width: min(520px, calc(100vw - 30px)); max-height: min(760px, calc(100vh - 30px)); padding: 0; overflow: auto; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: var(--surface); box-shadow: var(--shadow-lg); }
.asset-dialog::backdrop { background: rgba(9, 15, 25, .58); backdrop-filter: blur(3px); }
.asset-dialog form { position: relative; padding: 27px; }
.asset-dialog h2 { margin: 6px 0 0; font-size: 22px; letter-spacing: -.035em; }
.asset-dialog .eyebrow { margin: 0; }
.dialog-close { position: absolute; top: 17px; right: 17px; width: 32px; height: 32px; display: grid; place-items: center; padding: 0 0 2px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink-2); background: var(--surface-2); font-size: 20px; line-height: 1; }
.dialog-icon { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 11px; color: var(--brand); background: var(--brand-soft); }
.dialog-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dialog-description { margin: 10px 0 21px; color: var(--ink-3); font-size: 12px; line-height: 1.6; }
.dialog-field { display: flex; flex-direction: column; gap: 7px; }
.dialog-field > span, .tag-fieldset legend { color: var(--ink-2); font-size: 11px; font-weight: 750; }
.dialog-field input, .dialog-field select { width: 100%; height: 43px; padding: 0 12px; outline: 0; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--surface-2); font-size: 13px; }
.dialog-field input:focus, .dialog-field select:focus { border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 3px var(--brand-soft); }
.add-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tag-fieldset { min-width: 0; margin: 19px 0 0; padding: 0; border: 0; }
.tag-fieldset legend { margin-bottom: 9px; }
.tag-fieldset legend small { margin-left: 5px; color: var(--brand); font-size: 9px; }
.asset-tag-options { max-height: 255px; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; padding: 2px 5px 2px 2px; overflow-y: auto; }
.asset-tag-option { min-width: 0; display: flex; align-items: flex-start; gap: 8px; padding: 9px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--surface-2); cursor: pointer; }
.asset-tag-option:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.asset-tag-option input { margin: 2px 0 0; accent-color: var(--brand); }
.asset-tag-option span { min-width: 0; }
.asset-tag-option b { display: block; overflow: hidden; color: var(--ink-2); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.asset-tag-option small { display: -webkit-box; margin-top: 3px; overflow: hidden; color: var(--ink-3); font-size: 9px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.dialog-status { display: none; margin: 13px 0 0; padding: 10px 11px; border-radius: 8px; color: var(--loss); background: var(--loss-soft); font-size: 11px; line-height: 1.45; }
.dialog-status.show { display: block; }
.dialog-status.success { color: var(--profit); background: var(--profit-soft); }
.dialog-primary, .dialog-secondary { height: 42px; padding: 0 16px; border-radius: 9px; font-size: 12px; font-weight: 750; }
.dialog-primary { border: 0; color: #fff; background: var(--brand); }
.dialog-primary:hover { background: var(--brand-2); }
.dialog-primary:disabled { cursor: wait; opacity: .65; }
.admin-dialog .dialog-primary { width: 100%; margin-top: 14px; }
.dialog-secondary { border: 1px solid var(--line); color: var(--ink-2); background: var(--surface-2); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 17px; }

@media (max-width: 980px) {
  .asset-stats { grid-template-columns: 1fr 1fr; }
  .asset-toolbar { grid-template-columns: 1fr auto; }
  .asset-search { grid-column: 1 / -1; }
  .asset-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 650px) {
  .assets-header-inner { height: 62px; padding: 0 16px; }
  .assets-brand span:last-child, .dashboard-link { display: none; }
  .assets-main { width: min(100% - 28px, 1240px); padding-top: 17px; }
  .assets-hero { min-height: 190px; align-items: flex-start; padding: 29px 25px; }
  .assets-hero h1 { font-size: 29px; }
  .assets-hero p:last-child { max-width: 250px; line-height: 1.55; }
  .assets-hero-mark { width: 84px; height: 84px; position: absolute !important; right: 17px; bottom: 17px; margin: 0; opacity: .75; }
  .assets-hero-mark strong { font-size: 27px; }
  .asset-stats { gap: 9px; }
  .asset-stats article { min-height: 78px; padding: 13px; }
  .asset-catalogue { padding: 18px; }
  .catalogue-heading { align-items: stretch; flex-direction: column; gap: 10px; }
  .catalogue-actions { justify-content: space-between; }
  .asset-management-bar { align-items: stretch; flex-direction: column; }
  .asset-management-bar > div:last-child { justify-content: flex-end; }
  .asset-toolbar { grid-template-columns: 1fr; }
  .asset-search { grid-column: auto; }
  .asset-type-filter { overflow-x: auto; }
  .asset-type-filter button { flex: 1; min-width: 70px; }
  .asset-sort { width: 100%; }
  .asset-grid { grid-template-columns: 1fr; }
  .asset-card { min-height: 205px; }
  .assets-footer { flex-direction: column; gap: 8px; line-height: 1.5; }
  .asset-dialog form { padding: 23px 19px; }
  .add-form-grid, .asset-tag-options { grid-template-columns: 1fr; }
  .asset-tag-options { max-height: 300px; }
}
