/* ==========================================================
   Hero dashboard animasi — section .ld-hero
   Warna hanya memakai token dari colors.css / okta-theme.css
   ========================================================== */

.ld-hero {
    position: relative; overflow: hidden;
    display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center;
    max-width: 1200px; margin: 0 auto;
    padding: clamp(40px, 6vw, 88px) 20px clamp(36px, 5vw, 64px);
}
.ld-glow {
    position: absolute; width: 520px; height: 520px; border-radius: 50%;
    background: radial-gradient(circle, rgb(var(--p-blue-510) / .35), transparent 70%);
    top: -160px; left: -140px; pointer-events: none; filter: blur(20px);
    animation: ld-drift 14s ease-in-out infinite alternate;
}
.ld-copy, .ld-dash { position: relative; }

.ld-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
    border: 1px solid var(--okta-line); color: var(--okta-muted); background: var(--okta-surface);
    animation: ld-up .6s ease .1s both;
}
.ld-badge b { width: 6px; height: 6px; border-radius: 50%; background: rgb(var(--p-blue-678)); animation: ld-pulse 1.6s infinite; }
.ld-title {
    font-size: clamp(2.1rem, 5vw, 3.3rem); font-weight: 800; line-height: 1.12; letter-spacing: -.02em;
    margin: 20px 0 16px; color: var(--okta-ink); animation: ld-up .7s ease .2s both;
}
.ld-hl {
    background: linear-gradient(90deg, rgb(var(--p-blue-510)), rgb(var(--p-blue-678)), rgb(var(--p-blue-510)));
    background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: ld-shine 4s linear infinite;
}
.ld-lead { color: var(--okta-muted); font-size: 16px; line-height: 1.7; max-width: 520px; animation: ld-up .7s ease .3s both; }
.ld-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; animation: ld-up .7s ease .4s both; }
.ld-stats { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 36px; animation: ld-up .7s ease .5s both; }
.ld-stats strong { display: block; font-size: 22px; font-weight: 800; color: var(--okta-ink); font-variant-numeric: tabular-nums; }
.ld-stats span { font-size: 12px; color: var(--okta-muted); }

/* ---- kartu dashboard: mode terang (sesuai tema situs) ---- */
html .ld-hero .ld-dash {
    background: var(--okta-surface); border: 1px solid var(--okta-line);
    border-radius: 18px; padding: 18px; box-shadow: 0 24px 50px rgb(var(--p-blue-510) / .14);
    color: var(--okta-ink);
    animation: ld-float 6s ease-in-out infinite, ld-up .9s ease .3s both;
}
.ld-hero .ld-dash .ld-dash-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-size: 13px; color: var(--okta-muted); }
.ld-live { display: inline-flex; gap: 6px; align-items: center; color: var(--okta-brand); font-weight: 700; }
.ld-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--okta-brand); animation: ld-pulse 1.4s infinite; }

.ld-balance {
    background: linear-gradient(135deg, rgb(var(--p-blue-510)), rgb(var(--p-blue-275)));
    border-radius: 14px; padding: 18px; position: relative; overflow: hidden; color: rgb(var(--p-white));
}
.ld-balance::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgb(var(--p-white) / .18) 50%, transparent 70%);
    transform: translateX(-100%); animation: ld-sweep 3.6s ease-in-out infinite;
}
.ld-balance small { font-size: 12px; opacity: .85; font-weight: 600; }
.ld-amt { font-size: 30px; font-weight: 800; margin-top: 4px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.ld-chart { margin-top: 14px; height: 110px; width: 100%; display: block; }
.ld-line { stroke-dasharray: 600; stroke-dashoffset: 600; animation: ld-draw 2.4s ease .6s forwards; }
.ld-area { opacity: 0; animation: ld-fade 1s ease 1.8s forwards; }
.ld-dot { transform-box: fill-box; transform-origin: center; animation: ld-pulse 1.8s infinite; }

.ld-mini-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.ld-hero .ld-dash .ld-mini { background: var(--okta-surface-2); border-radius: 12px; padding: 12px; }
.ld-mini span { font-size: 11px; color: var(--okta-muted); }
.ld-mini strong { display: block; color: var(--okta-ink); font-size: 17px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.ld-bars { display: flex; align-items: flex-end; gap: 4px; height: 38px; margin-top: 8px; }
.ld-bars i {
    flex: 1; border-radius: 3px 3px 0 0; background: var(--okta-brand); opacity: .75; height: 0;
    animation: ld-grow 1.2s cubic-bezier(.2,.8,.2,1) forwards;
}

.ld-hero .ld-dash .ld-tx-title { font-size: 13px; font-weight: 700; margin: 16px 0 4px; display: flex; justify-content: space-between; }
.ld-tx-title span { color: var(--okta-muted); font-weight: 600; }
.ld-hero .ld-dash .ld-tx { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-top: 1px solid var(--okta-line); font-size: 13px; }
.ld-tx-who { display: flex; align-items: center; gap: 10px; }
.ld-tx-ic { width: 30px; height: 30px; border-radius: 9px; background: var(--okta-surface-2); display: grid; place-items: center; font-size: 13px; }
.ld-tx-sub { font-size: 11px; color: var(--okta-muted); }
.ld-tx-val { font-weight: 700; color: var(--okta-brand); font-variant-numeric: tabular-nums; }
.ld-tx-val.is-out { color: var(--okta-warn); }
.ld-tx.is-new { animation: ld-slide .6s ease both; }

.ld-toast {
    position: absolute; right: -14px; bottom: 30px;
    background: var(--okta-surface); color: var(--okta-ink); border: 1px solid var(--okta-line); border-radius: 12px; padding: 10px 14px;
    box-shadow: 0 16px 36px rgb(var(--p-black) / .35); font-size: 12px; font-weight: 700;
    display: flex; gap: 8px; align-items: center; min-width: 200px;
    animation: ld-toast 4s ease infinite;
}
.ld-toast-ic { width: 26px; height: 26px; border-radius: 50%; background: rgb(var(--p-blue-949)); display: grid; place-items: center; color: rgb(var(--p-blue-480)); }
.ld-toast small { display: block; font-weight: 500; color: var(--okta-muted); font-size: 11px; }

/* ---- animasi ---- */
@keyframes ld-up     { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes ld-fade   { to { opacity: 1; } }
@keyframes ld-float  { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes ld-drift  { to { transform: translate(60px, 40px); } }
@keyframes ld-pulse  { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }
@keyframes ld-shine  { to { background-position: 200% center; } }
@keyframes ld-sweep  { 0% { transform: translateX(-100%); } 60%,100% { transform: translateX(100%); } }
@keyframes ld-draw   { to { stroke-dashoffset: 0; } }
@keyframes ld-grow   { to { height: var(--h); } }
@keyframes ld-slide  { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
@keyframes ld-toast {
    0%   { opacity: 0; transform: translateY(16px) scale(.96); }
    8%   { opacity: 1; transform: none; }
    80%  { opacity: 1; transform: none; }
    92%,100% { opacity: 0; transform: translateY(-8px); }
}

/* ---- kartu fitur bergerak saat di-scroll (dipakai di lp-sec) ---- */
.ld-reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.ld-reveal.is-in { opacity: 1; transform: none; }

/* ---- responsif ---- */
@media (max-width: 900px) {
    .ld-hero { grid-template-columns: 1fr; gap: 36px; }
    .ld-toast { right: 8px; }
}
@media (max-width: 560px) {
    .ld-stats { gap: 18px; }
    .ld-toast { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .ld-hero *, .ld-hero *::before, .ld-hero *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .ld-line { stroke-dashoffset: 0; }
    .ld-reveal { opacity: 1; transform: none; }
}

/* Ikon centang pada notifikasi */
.ld-toast-ic svg { width: 14px; height: 14px; color: rgb(var(--p-blue-480)); }
