.personal-dashboard {
  --dash-bg: #f3f6f4;
  --dash-ink: #071410;
  --dash-muted: #6d7b75;
  --dash-line: #dde6e0;
  min-height: 100vh;
  background: var(--dash-bg);
}

.dashboard-hero {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(110deg, rgba(7, 20, 16, .98), rgba(8, 31, 23, .94)),
    radial-gradient(circle at 20% 20%, #174a37, transparent 45%);
}

.dashboard-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .17;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(90deg, transparent, #000 35%, #000);
}

.dashboard-orb { position: absolute; border-radius: 50%; filter: blur(4px); pointer-events: none; }
.dashboard-orb-one { width: 330px; height: 330px; left: 7%; top: -190px; background: rgba(54, 211, 153, .12); box-shadow: 0 0 100px rgba(54,211,153,.15); }
.dashboard-orb-two { width: 240px; height: 240px; right: -100px; bottom: -140px; background: rgba(215, 173, 85, .1); }
.dashboard-hero-inner { min-height: 300px; position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 340px; align-items: center; gap: 48px; }
.dashboard-intro { padding: 26px 0; }
.dashboard-eyebrow { display: inline-flex; align-items: center; gap: 9px; padding: 6px 11px; border-radius: 999px; border: 1px solid rgba(54,211,153,.2); background: rgba(54,211,153,.08); color: #6be6b8; font-size: .76rem; font-weight: 700; }
.dashboard-eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: #36d399; box-shadow: 0 0 0 5px rgba(54,211,153,.11); }
.dashboard-intro h1 { margin: 12px 0 8px; font-size: clamp(2rem, 3.5vw, 3rem); line-height: 1.25; letter-spacing: -.045em; font-weight: 800; }
.dashboard-intro h1 em { color: #d7ad55; font-style: normal; }
.dashboard-intro p { max-width: 600px; margin: 0; color: #a8b9b2; font-size: .98rem; }
.dashboard-actions { display: flex; gap: 10px; margin-top: 18px; }
.dashboard-actions button { min-height: 45px; border-radius: 11px; padding: 9px 17px; font-size: .8rem; font-weight: 700; cursor: pointer; transition: .2s ease; }
.dashboard-primary { display: inline-flex; align-items: center; gap: 9px; border: 0; color: #052218; background: #36d399; box-shadow: 0 12px 30px rgba(54,211,153,.17); }
.dashboard-primary svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.dashboard-primary:hover { transform: translateY(-2px); background: #57e0ad; }
.dashboard-ghost { border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.055); color: #d6e1dc; }
.dashboard-ghost:hover { background: rgba(255,255,255,.1); }

.dashboard-preview { width: 340px; height: 190px; position: relative; border: 1px solid rgba(255,255,255,.13); border-radius: 20px; background: linear-gradient(145deg, rgba(255,255,255,.09), rgba(255,255,255,.025)); box-shadow: 0 28px 60px rgba(0,0,0,.28); transform: perspective(900px) rotateY(7deg) rotateX(2deg); backdrop-filter: blur(12px); overflow: hidden; }
.dashboard-preview::before { content: ""; position: absolute; inset: 0; background: linear-gradient(125deg, rgba(255,255,255,.08), transparent 35%); }
.preview-grid { position: absolute; inset: 20px 20px auto; display: grid; grid-template-columns: repeat(4,1fr); gap: 7px; }
.preview-grid span { height: 55px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.045); border-radius: 10px; }
.preview-grid span::before { content: ""; display: block; width: 16px; height: 16px; margin: 10px; border-radius: 5px; background: rgba(54,211,153,.5); }
.preview-grid span:nth-child(2)::before { background: rgba(215,173,85,.7); }
.preview-grid span:nth-child(3)::before { background: rgba(126,115,235,.7); }
.preview-grid span:nth-child(4)::before { background: rgba(87,145,207,.7); }
.preview-line { position: absolute; right: 25px; left: 25px; top: 104px; height: 90px; border-bottom: 1px solid rgba(255,255,255,.07); }
.preview-line::before { content: ""; position: absolute; inset: 20px 0; border-top: 1px dashed rgba(255,255,255,.07); border-bottom: 1px dashed rgba(255,255,255,.07); }
.preview-line i { position: absolute; width: 24%; height: 2px; background: #36d399; transform-origin: right center; box-shadow: 0 0 13px rgba(54,211,153,.45); }
.preview-line i:nth-child(1) { right: 0; top: 58px; transform: rotate(-10deg); }
.preview-line i:nth-child(2) { right: 20%; top: 44px; transform: rotate(13deg); }
.preview-line i:nth-child(3) { right: 40%; top: 60px; transform: rotate(-22deg); }
.preview-line i:nth-child(4) { right: 60%; top: 29px; transform: rotate(13deg); }
.preview-line i:nth-child(5) { right: 80%; top: 45px; width: 20%; transform: rotate(-8deg); }
.preview-stats { position: absolute; right: 22px; left: 22px; bottom: 19px; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.preview-stats span { height: 37px; border-radius: 8px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); }

.dashboard-workspace { padding-block: 70px 90px; }
.dashboard-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 27px; }
.dashboard-toolbar h2 { font-size: clamp(1.7rem, 3vw, 2.35rem); margin: 2px 0 2px; font-weight: 800; letter-spacing: -.035em; }
.dashboard-toolbar p { margin: 0; color: var(--dash-muted); font-size: .8rem; }
.dashboard-status { display: flex; align-items: stretch; gap: 9px; }
.dashboard-status > div { min-width: 165px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 11px; border: 1px solid var(--dash-line); background: #fff; }
.dashboard-status small { color: var(--dash-muted); font-size: .68rem; }
.dashboard-status b { direction: ltr; font-size: .78rem; }
.dashboard-status > button { display: flex; align-items: center; gap: 7px; padding: 8px 13px; border: 1px solid #cad8d0; border-radius: 11px; background: #fff; font-size: .72rem; font-weight: 700; cursor: pointer; }
.dashboard-status > button:hover { border-color: #0b8f67; }
.dashboard-status svg { width: 16px; fill: none; stroke: #0b8f67; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dashboard-status button.loading svg { animation: spin .8s linear infinite; }

.dashboard-filterbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 17px; }
.dashboard-categories { display: flex; align-items: center; gap: 7px; overflow-x: auto; scrollbar-width: none; }
.dashboard-categories::-webkit-scrollbar { display: none; }
.dashboard-categories button { flex: 0 0 auto; border: 1px solid var(--dash-line); background: #fff; color: #66756e; border-radius: 9px; padding: 7px 12px; font-size: .72rem; cursor: pointer; transition: .18s ease; }
.dashboard-categories button:hover { border-color: #a9c2b6; }
.dashboard-categories button.active { color: #fff; background: #0b211a; border-color: #0b211a; }
.add-card-button { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border: 0; border-radius: 9px; color: #076e4e; background: #daf5e9; font-size: .72rem; font-weight: 700; cursor: pointer; }
.add-card-button span { font-size: 1.05rem; line-height: 1; }

.dashboard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; align-items: stretch; }
.dashboard-card { min-width: 0; position: relative; display: flex; flex-direction: column; min-height: 340px; padding: 18px; border: 1px solid #dfe7e2; border-radius: 17px; background: #fff; box-shadow: 0 7px 25px rgba(7,20,16,.035); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, opacity .2s; overflow: hidden; }
.dashboard-card::before { content: ""; position: absolute; top: 0; right: 18px; left: 18px; height: 2px; opacity: .8; background: linear-gradient(90deg, transparent, #36d399, transparent); }
.dashboard-card:hover { transform: translateY(-3px); border-color: #c9d8d0; box-shadow: 0 18px 45px rgba(7,20,16,.08); }
.dashboard-card.wide { grid-column: span 2; }
.dashboard-card.dragging { opacity: .42; transform: scale(.98); }
.dashboard-card.drag-target { border-color: #36b788; box-shadow: 0 0 0 3px rgba(54,183,136,.12); }
.dashboard-card.filtered-out { display: none; }
.dashboard-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dashboard-asset { min-width: 0; display: flex; align-items: center; gap: 10px; }
.dashboard-asset > div { min-width: 0; display: grid; line-height: 1.35; }
.dashboard-asset h3 { overflow: hidden; margin: 0; font-size: .9rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-asset div span { color: #89968f; font-size: .65rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-card .asset-icon { width: 39px; height: 39px; border-radius: 11px; }
.card-tools { display: flex; align-items: center; gap: 1px; }
.card-tools button { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 7px; color: #9aa49f; background: transparent; cursor: pointer; }
.card-tools button:hover { color: #23372f; background: #f0f4f1; }
.card-tools svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.card-tools .drag-handle { cursor: grab; }
.card-tools .drag-handle:active { cursor: grabbing; }
.card-tools .drag-handle svg { fill: currentColor; stroke: none; }

.dashboard-price-row { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-top: 20px; }
.dashboard-price { min-width: 0; display: flex; align-items: baseline; gap: 6px; }
.dashboard-price strong { overflow: hidden; font-size: 1.38rem; line-height: 1.25; letter-spacing: -.03em; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-price span { flex: 0 0 auto; color: #839089; font-size: .64rem; }
.dashboard-change { flex: 0 0 auto; padding: 4px 7px; border-radius: 7px; direction: ltr; font-size: .66rem; font-weight: 800; }
.dashboard-change.up { color: #087651; background: #e4f8ef; }
.dashboard-change.down { color: #c53e4a; background: #ffeff1; }
.dashboard-change.flat { color: #747f79; background: #eef2ef; }
.mini-chart-wrap { position: relative; min-height: 106px; height: 106px; margin: 12px -4px 5px; }
.mini-chart-wrap canvas { width: 100%; height: 100%; }
.mini-chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #a0aaa5; font-size: .66rem; border-bottom: 1px dashed #e5ebe7; }
.dashboard-card-metrics { display: grid; grid-template-columns: repeat(3,1fr); margin-top: auto; border: 1px solid #edf1ee; border-radius: 10px; background: #fafcfb; overflow: hidden; }
.dashboard-card-metrics > div { min-width: 0; display: grid; gap: 1px; padding: 8px 9px; border-left: 1px solid #edf1ee; }
.dashboard-card-metrics > div:last-child { border-left: 0; }
.dashboard-card-metrics small { color: #89968f; font-size: .59rem; }
.dashboard-card-metrics b { overflow: hidden; font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-card-metrics b.up { color: #0a815c; }
.dashboard-card-metrics b.down { color: #ce4350; }
.dashboard-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 11px; color: #8c9892; font-size: .62rem; }
.dashboard-card-footer span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-card-footer i { display: inline-block; width: 5px; height: 5px; margin-left: 5px; border-radius: 50%; background: #36d399; }
.dashboard-card-footer time { flex: 0 0 auto; direction: ltr; }

.dashboard-tip { display: flex; align-items: center; gap: 11px; margin-top: 20px; padding: 12px 15px; border: 1px dashed #cbd8d1; border-radius: 12px; color: #69766f; background: rgba(255,255,255,.55); font-size: .7rem; }
.dashboard-tip > span { flex: 0 0 auto; padding: 3px 8px; border-radius: 6px; color: #087452; background: #dff7eb; font-weight: 800; }
.dashboard-tip p { margin: 0; }
.dashboard-tip svg { order: -1; width: 18px; margin-right: auto; fill: none; stroke: #8b9992; stroke-width: 1.7; stroke-linecap: round; }
.dashboard-empty { min-height: 330px; display: grid; place-items: center; align-content: center; text-align: center; border: 1px dashed #c8d5ce; border-radius: 18px; background: rgba(255,255,255,.65); }
.empty-visual { width: 64px; height: 64px; display: grid; place-items: center; margin-bottom: 12px; border-radius: 20px; color: #087452; background: #dff7eb; font-size: 2rem; }
.dashboard-empty h3 { margin: 0; font-size: 1rem; }
.dashboard-empty p { margin: 4px 0 15px; color: #748179; font-size: .78rem; }
.dashboard-empty button { border: 0; border-radius: 9px; padding: 8px 14px; color: #fff; background: #0b211a; font-size: .74rem; cursor: pointer; }
.dashboard-message { display: flex; align-items: center; gap: 16px; padding: 24px; border: 1px dashed #cdd8d2; border-radius: 16px; background: #fff; }
.dashboard-message > span { width: 45px; height: 45px; display: grid; place-items: center; border-radius: 13px; color: #0b8f67; background: #e2f7ed; font-size: 1.3rem; }
.dashboard-message h3, .dashboard-message p { margin: 0; }
.dashboard-message h3 { font-size: .95rem; }
.dashboard-message p { color: #77847d; font-size: .75rem; }
.dashboard-message button { margin-right: auto; padding: 8px 13px; border: 0; border-radius: 9px; color: #fff; background: #0b211a; font-size: .72rem; cursor: pointer; }
.dashboard-error > span { color: #c53e4a; background: #ffeff1; }

.dashboard-customizer { width: min(760px, calc(100% - 30px)); max-height: min(760px, calc(100vh - 30px)); padding: 0; border: 0; border-radius: 21px; color: #071410; background: #f7f9f7; box-shadow: 0 35px 90px rgba(0,0,0,.3); overflow: hidden; }
.dashboard-customizer::backdrop { background: rgba(3,12,9,.72); backdrop-filter: blur(6px); }
.dashboard-customizer[open] { animation: customizerIn .2s ease-out; }
@keyframes customizerIn { from { opacity: 0; transform: translateY(12px) scale(.985); } }
.customizer-shell { max-height: min(760px, calc(100vh - 30px)); display: flex; flex-direction: column; }
.customizer-head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 24px 17px; background: #fff; border-bottom: 1px solid #e6ece8; }
.customizer-head span { color: #0b8f67; font-size: .67rem; font-weight: 700; }
.customizer-head h2 { margin: 2px 0 0; font-size: 1.22rem; }
.customizer-head button { width: 35px; height: 35px; padding: 0; border: 0; border-radius: 10px; color: #64726b; background: #f0f3f1; font-size: 1.35rem; cursor: pointer; }
.customizer-search { flex: 0 0 auto; height: 44px; display: flex; align-items: center; gap: 9px; margin: 16px 24px 10px; padding: 0 12px; border: 1px solid #dce5df; border-radius: 10px; background: #fff; }
.customizer-search:focus-within { border-color: #0b8f67; box-shadow: 0 0 0 3px rgba(11,143,103,.08); }
.customizer-search svg { width: 18px; fill: none; stroke: #87938d; stroke-width: 1.7; stroke-linecap: round; }
.customizer-search input { width: 100%; border: 0; outline: 0; background: transparent; font-size: .78rem; }
.customizer-categories { flex: 0 0 auto; display: flex; gap: 6px; padding: 0 24px 12px; overflow-x: auto; scrollbar-width: none; }
.customizer-categories button { flex: 0 0 auto; padding: 5px 10px; border: 1px solid #dce5df; border-radius: 8px; color: #69776f; background: #fff; font-size: .67rem; cursor: pointer; }
.customizer-categories button.active { color: #fff; background: #0b211a; border-color: #0b211a; }
.customizer-list { min-height: 220px; flex: 1 1 auto; display: grid; grid-template-columns: 1fr 1fr; align-content: start; gap: 8px; padding: 3px 24px 18px; overflow-y: auto; }
.customizer-item { position: relative; min-width: 0; display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; align-items: center; gap: 9px; padding: 11px; border: 1px solid #dfe7e2; border-radius: 11px; background: #fff; cursor: pointer; transition: border-color .16s, box-shadow .16s; }
.customizer-item:hover { border-color: #b9cdc2; }
.customizer-item:has(input:checked) { border-color: #70c8a7; box-shadow: inset 0 0 0 1px rgba(11,143,103,.1); background: #fbfffd; }
.customizer-item .asset-icon { width: 34px; height: 34px; border-radius: 9px; font-size: .62rem; }
.picker-asset { min-width: 0; display: grid; line-height: 1.4; }
.picker-asset b { overflow: hidden; font-size: .74rem; text-overflow: ellipsis; white-space: nowrap; }
.picker-asset small { overflow: hidden; color: #8c9892; font-size: .57rem; text-overflow: ellipsis; white-space: nowrap; }
.picker-price { display: grid; text-align: left; line-height: 1.4; }
.picker-price b { direction: rtl; font-size: .7rem; white-space: nowrap; }
.picker-price small { color: #909c96; font-size: .55rem; }
.customizer-item input { position: absolute; opacity: 0; pointer-events: none; }
.choice-mark { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid #cad6cf; border-radius: 7px; color: transparent; background: #f7f9f8; }
.choice-mark svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.customizer-item input:checked + .choice-mark { color: #fff; border-color: #0b8f67; background: #0b8f67; }
.picker-no-result { grid-column: 1 / -1; padding: 45px 10px; text-align: center; color: #7c8982; font-size: .75rem; }
.customizer-footer { flex: 0 0 auto; min-height: 65px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 24px; border-top: 1px solid #dfe7e2; background: #fff; }
.customizer-footer > span { color: #748078; font-size: .7rem; }
.customizer-footer > span b { color: #071410; }
.customizer-footer > div { display: flex; gap: 7px; }
.customizer-footer button { padding: 8px 13px; border-radius: 9px; font-size: .7rem; cursor: pointer; }
.clear-selection { border: 1px solid #dce4df; color: #68756e; background: #fff; }
.apply-selection { border: 1px solid #0b211a; color: #fff; background: #0b211a; font-weight: 700; }

@media (max-width: 1050px) {
  .dashboard-hero-inner { grid-template-columns: 1fr 310px; gap: 36px; }
  .dashboard-preview { width: 310px; }
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 820px) {
  .dashboard-hero { min-height: 310px; }
  .dashboard-hero-inner { min-height: 310px; grid-template-columns: 1fr; }
  .dashboard-intro { max-width: 600px; }
  .dashboard-preview { display: none; }
  .dashboard-toolbar { align-items: stretch; flex-direction: column; }
  .dashboard-status { justify-content: space-between; }
  .dashboard-card.wide { grid-column: span 2; }
}

@media (max-width: 600px) {
  .dashboard-hero, .dashboard-hero-inner { min-height: 360px; }
  .dashboard-intro { padding: 26px 0; }
  .dashboard-intro h1 { font-size: 2rem; }
  .dashboard-intro p { font-size: .88rem; }
  .dashboard-actions { align-items: stretch; flex-direction: column; }
  .dashboard-workspace { padding-block: 50px 65px; }
  .dashboard-status > div { min-width: 0; flex: 1; }
  .dashboard-status > button { padding-inline: 10px; }
  .dashboard-filterbar { align-items: stretch; flex-direction: column-reverse; }
  .add-card-button { align-self: flex-start; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-card, .dashboard-card.wide { grid-column: auto; }
  .card-tools [data-card-size] { display: none; }
  .dashboard-tip { align-items: flex-start; }
  .dashboard-tip svg { display: none; }
  .customizer-head { padding-inline: 17px; }
  .customizer-search { margin-inline: 17px; }
  .customizer-categories { padding-inline: 17px; }
  .customizer-list { grid-template-columns: 1fr; padding-inline: 17px; }
  .customizer-footer { align-items: stretch; flex-direction: column; padding: 10px 17px 15px; }
  .customizer-footer > div { display: grid; grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-customizer[open] { animation: none; }
}
