@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

:root{
    --bg: #f5f7fb;
    --card: #ffffff;
    --line: #e5e7eb;
    --text: #111827;
    --muted: #6b7280;
    --sidebar: #1f2937;
    --sidebar-2: #111827;
    --primary: #7c3aed;
    --primary-2: #9333ea;
    --cyan: #06b6d4;
    --slate: #64748b;
    --shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
    --mobile-header-offset: 74px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

a { text-decoration: none; color: inherit; }
button { font: inherit; }

.app {
    min-height: 100vh;
    display: block;
}

.content {
    min-width: 0;
    padding: 28px 28px 44px;
}

.content-with-shell {
    margin-left: 78px;
    padding-top: 92px;
    transition:
        margin-left .28s cubic-bezier(.22, 1, .36, 1),
        filter .28s ease;
}

@media (min-width: 1081px) {
    .cw-sidebar:hover ~ .cw-header ~ .content-with-shell,
    .cw-sidebar:hover ~ .content-with-shell {
        margin-left: 96px;
    }
}

.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.page-title-wrap h1 {
    margin: 0 0 8px;
    font-size: 36px;
    line-height: 1.15;
    font-weight: 800;
}

.page-title-wrap p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
}

.page-badge {
    padding: 10px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.95fr;
    gap: 24px;
    align-items: stretch;
}

.card {
    background: var(--card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    border: 1px solid rgba(15, 23, 42, 0.04);
}

.hero-card,
.action-card,
.summary-card,
.staking-card,
.recent-card {
    padding: 28px;
}

.hero-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.hero-top .label {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 6px;
}

.hero-top .value {
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.hero-top .sub {
    margin-top: 8px;
    font-size: 14px;
    color: var(--muted);
}

.asset-state-chip {
    padding: 12px 14px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid var(--line);
    min-width: 170px;
}

.asset-state-chip strong {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 6px;
}

.asset-state-chip span {
    display: block;
    font-size: 18px;
    font-weight: 800;
}

.hero-chart-row {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 20px;
    align-items: center;
}

.donut-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 360px;
}

.donut-svg {
    width: 320px;
    height: 320px;
    transform: rotate(-90deg);
    overflow: visible;
}

.donut-bg {
    fill: none;
    stroke: #eef2f7;
    stroke-width: 28;
}

.donut-segment {
    fill: none;
    stroke-width: 28;
    stroke-linecap: round;
    transition: opacity .25s ease, transform .25s ease;
}

.donut-segment:hover {
    opacity: 0.88;
}

.donut-center {
    position: absolute;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffffff 0%, #fbfbfe 100%);
    box-shadow: inset 0 0 0 1px #ede9fe;
}

.donut-center .small {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 8px;
}

.donut-center .big {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.donut-center .mini {
    margin-top: 8px;
    font-size: 12px;
    color: var(--muted);
}

.legend-list {
    display: grid;
    gap: 14px;
}

.legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 18px;
    background: #fafafa;
    border: 1px solid #eef2f7;
}

.legend-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex: 0 0 12px;
}

.legend-text strong {
    display: block;
    font-size: 15px;
    margin-bottom: 3px;
}

.legend-text span {
    font-size: 13px;
    color: var(--muted);
}

.legend-right {
    text-align: right;
}

.legend-right strong {
    display: block;
    font-size: 15px;
    margin-bottom: 3px;
}

.legend-right span {
    font-size: 13px;
    color: var(--muted);
}

.side-grid {
    display: grid;
    gap: 18px;
}

.section-title {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 800;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
    min-height: 88px;
    padding: 18px;
    border-radius: 18px;
    border: 0;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    box-shadow: 0 12px 24px rgba(124,58,237,0.22);
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(124,58,237,0.28);
}

.action-btn small {
    opacity: 0.82;
    font-size: 12px;
}

.action-btn strong {
    font-size: 17px;
    font-weight: 800;
}

.summary-grid {
    display: grid;
    gap: 12px;
}

.mini-stat {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 18px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid var(--line);
}

.mini-stat .left strong {
    display: block;
    font-size: 14px;
    margin-bottom: 0;
}

.mini-stat .left span {
    color: var(--muted);
    font-size: 13px;
}

.mini-stat .right {
    text-align: right;
}

.mini-stat .right strong {
    display: block;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.15;
}

.mini-stat .right span {
    color: var(--muted);
    font-size: 12px;
}

.staking-highlight {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.staking-box {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
}

.staking-box strong {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 8px;
}

.staking-box span {
    display: block;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.15;
}

.mobile-card-toggle {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
}

.mobile-card-toggle__summary,
.mobile-card-toggle__icon,
.mobile-card-preview {
    display: none;
}

.mobile-card-body {
    margin-top: 0;
}

.recent-list {
    display: grid;
    gap: 12px;
}

.recent-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #f1f5f9;
}

.recent-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.recent-row:first-child {
    padding-top: 0;
}

.recent-left strong {
    display: block;
    font-size: 14px;
    margin-bottom: 5px;
}

.recent-left span {
    font-size: 12px;
    color: var(--muted);
}

.recent-right {
    text-align: right;
}

.recent-right strong {
    display: block;
    font-size: 15px;
    margin-bottom: 5px;
}

.status-done {
    color: #0f766e;
}

.status-wait {
    color: #a16207;
}

.footer-note {
    margin-top: 22px;
    color: var(--muted);
    font-size: 12px;
    text-align: right;
}

.staking-subnav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.staking-subnav__item {
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all .18s ease;
}

.staking-subnav__item:hover {
    background: #f8fafc;
    transform: translateY(-1px);
}

.staking-subnav__item.is-active {
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
    color: #fff;
    border: none;
    box-shadow: 0 10px 20px rgba(124, 58, 237, 0.18);
}

@media (max-width: 1320px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-chart-row {
        grid-template-columns: 320px 1fr;
    }
}

@media (max-width: 1080px) {
    .content-with-shell {
        margin-left: 0;
        padding-top: var(--mobile-header-offset);
    }

    .page-head {
        display: none !important;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 18px;
        margin-top: 0 !important;
    }

    .hero-card,
    .action-card,
    .summary-card,
    .staking-card,
    .recent-card {
        padding: 20px;
    }

    .hero-top .value {
        font-size: 32px;
    }

    .hero-chart-row {
        grid-template-columns: 1fr;
    }

    .donut-wrap {
        min-height: 290px;
    }

    .donut-svg {
        width: 270px;
        height: 270px;
    }

    .donut-center {
        width: 164px;
        height: 164px;
    }

    .donut-center .big {
        font-size: 28px;
    }

    .staking-highlight {
        grid-template-columns: 1fr;
    }

    .staking-subnav {
        flex-wrap: wrap;
        margin-bottom: 18px;
    }

    .hero-top > div:first-child {
        display: none;
    }

    .asset-state-chip {
        display: none;
    }

    .action-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .action-btn {
        min-height: 72px;
        padding: 14px;
        border-radius: 14px;
    }

    .action-btn strong {
        font-size: 15px;
    }

    .action-btn small {
        font-size: 11px;
    }

    .mobile-collapsible-card {
        overflow: hidden;
    }

    .mobile-card-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        cursor: pointer;
    }

    .mobile-card-toggle__title-wrap {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        min-width: 0;
    }

    .mobile-card-toggle__title {
        margin: 0;
    }

    .mobile-card-toggle__summary {
        display: block;
        font-size: 12px;
        color: var(--muted);
        line-height: 1.4;
    }

    .mobile-card-toggle__icon {
        display: inline-flex;
        width: 24px;
        height: 24px;
        flex: 0 0 24px;
        align-items: center;
        justify-content: center;
        transition: transform .28s ease;
    }

    .mobile-card-toggle__icon svg {
        width: 18px;
        height: 18px;
        display: block;
    }

    .mobile-collapsible-card.is-open .mobile-card-toggle__icon {
        transform: rotate(180deg);
    }

    .mobile-card-body {
        margin-top: 14px;
        overflow: hidden;
        opacity: 1;
        max-height: none;
        transition:
            max-height .32s cubic-bezier(.22, 1, .36, 1),
            opacity .22s ease,
            margin-top .32s cubic-bezier(.22, 1, .36, 1);
        will-change: max-height, opacity;
    }

    .mobile-card-body[hidden] {
        display: block !important;
        margin-top: 0;
        opacity: 0;
        max-height: 0;
        pointer-events: none;
    }

    .mobile-card-preview {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-top: 14px;
        transition:
            opacity .24s ease,
            transform .24s ease;
    }

    .mobile-card-preview__item {
        padding: 14px;
        border-radius: 14px;
        background: #f8fafc;
        border: 1px solid var(--line);
    }

    .mobile-card-preview__item strong {
        display: block;
        margin-bottom: 6px;
        font-size: 12px;
        color: var(--muted);
        line-height: 1.35;
    }

    .mobile-card-preview__item span {
        display: block;
        font-size: 16px;
        font-weight: 800;
        line-height: 1.3;
        color: var(--text);
        word-break: keep-all;
    }

    .mobile-collapsible-card.is-open .mobile-card-preview {
        display: none;
    }

    .summary-card .mini-stat,
    .staking-card .staking-box {
        border-radius: 14px;
    }

    .staking-card .staking-highlight {
        margin-top: 0;
    }

    .staking-card .staking-box strong {
        font-size: 12px;
        line-height: 1.35;
        margin-bottom: 6px;
    }

    .staking-card .staking-box span {
        font-size: 16px;
        line-height: 1.3;
    }
}

@media (max-width: 720px) {
    .hero-top {
        flex-direction: column;
    }

    .asset-state-chip {
        width: 100%;
        min-width: 0;
    }

    .action-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .legend-item {
        padding: 14px 14px;
    }

    .mini-stat .right strong {
        font-size: 18px;
    }
}

@media (max-width: 560px) {
    .content.content-with-shell {
        padding: var(--mobile-header-offset) 14px 24px;
    }

    .page-title-wrap h1 {
        font-size: 26px;
    }

    .hero-top .value {
        font-size: 28px;
    }

    .action-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .recent-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .recent-right {
        text-align: left;
    }

    .staking-subnav__item {
        flex: 1 1 calc(50% - 5px);
        text-align: center;
    }

    .mobile-card-preview {
        grid-template-columns: 1fr;
    }

    .mobile-card-toggle__title {
        font-size: 17px;
    }

    .summary-card .mini-stat,
    .staking-card .staking-box {
        padding: 14px;
    }
}