:root {
    --green: #1f9d55;
    --green-dark: #167a42;
    --green-light: #e6f6ec;
    --gray-900: #1f2428;
    --gray-700: #3d454c;
    --gray-500: #6b747c;
    --gray-300: #d5d9dd;
    --gray-100: #f1f3f4;
    --white: #ffffff;
    --radius: 16px;
    --shadow: 0 6px 24px rgba(31, 36, 40, .08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
    background: var(--gray-100);
    color: var(--gray-900);
    line-height: 1.5;
}

a { text-decoration: none; color: inherit; }

/* ================= HEADER ================= */
.header {
    background: var(--gray-900);
    border-bottom: 4px solid var(--green);
    position: sticky;
    top: 0;
    z-index: 50;
}
.header__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--white); font-size: 1.25rem; }
.brand b { color: var(--green); }
.brand__logo {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    background: var(--green);
    color: var(--white);
    border-radius: 10px;
}
.nav { display: flex; gap: 6px; }
.nav a {
    color: #c3c9ce;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: .95rem;
    transition: .2s;
}
.nav a:hover { color: var(--white); background: var(--gray-700); }
.nav a.active { background: var(--green); color: var(--white); }

.header__right { display: flex; align-items: center; gap: 14px; }
.user { display: flex; align-items: center; gap: 10px; color: var(--white); }
.user__avatar {
    width: 36px; height: 36px;
    display: grid; place-items: center;
    background: var(--white);
    color: var(--green-dark);
    font-weight: 700;
    border-radius: 50%;
}
.user__name { font-size: .95rem; }

.burger { display: none; background: none; border: 0; cursor: pointer; padding: 6px; }
.burger span { display: block; width: 24px; height: 2px; background: var(--white); margin: 5px 0; transition: .25s; }

/* ================= LAYOUT ================= */
.container { max-width: 1100px; margin: 0 auto; padding: 28px 20px 50px; }

/* ================= HERO ================= */
.hero {
    background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
    color: var(--white);
    text-align: center;
    padding: 44px 20px;
    border-radius: 24px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.hero::before, .hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
}
.hero::before { width: 260px; height: 260px; top: -110px; left: -70px; }
.hero::after  { width: 200px; height: 200px; bottom: -90px; right: -40px; }
.hero__label { text-transform: uppercase; letter-spacing: 2px; font-size: .85rem; opacity: .85; }
.hero__amount { font-size: clamp(2.2rem, 7vw, 4rem); margin: 8px 0; font-weight: 800; position: relative; }
.hero__sub { opacity: .9; position: relative; }

/* ================= CARDS ================= */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 22px;
}
.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--gray-300);
}
.card--right { border-top-color: var(--green); }
.card__icon {
    width: 44px; height: 44px;
    display: grid; place-items: center;
    border-radius: 12px;
    background: var(--gray-100);
    color: var(--gray-700);
    margin-bottom: 14px;
}
.card__icon--green { background: var(--green-light); color: var(--green-dark); }
.card__label { color: var(--gray-500); font-size: .9rem; }
.card__amount { font-size: 1.8rem; font-weight: 800; margin: 4px 0; color: var(--gray-900); }
.card__amount--green { color: var(--green-dark); font-variant-numeric: tabular-nums; }
.card__hint { color: var(--gray-500); font-size: .85rem; }

.btn {
    margin-top: 16px;
    background: var(--green);
    color: var(--white);
    border: 0;
    padding: 12px 26px;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: .2s;
}
.btn:hover { background: var(--green-dark); transform: translateY(-1px); }

/* ================= REMAINING ================= */
.remaining {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    margin-top: 22px;
    box-shadow: var(--shadow);
}
.remaining__top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.remaining__num { font-size: 2.4rem; font-weight: 800; color: var(--green-dark); }
.remaining__num small { font-size: 1rem; font-weight: 500; color: var(--gray-500); }
.remaining__info { text-align: right; color: var(--gray-500); font-size: .9rem; }
.remaining__info strong { color: var(--gray-900); font-size: 1.1rem; }

.progress { height: 12px; background: var(--gray-100); border-radius: 999px; margin-top: 18px; overflow: hidden; }
.progress__bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--green), #4cc57f);
    border-radius: 999px;
    animation: fill 1.2s ease forwards;
}
@keyframes fill { to { width: var(--w); } }
.progress__text { font-size: .85rem; color: var(--gray-500); margin-top: 8px; }

/* ================= TABLE ================= */
.plans { margin-top: 30px; }
.plans h2 { font-size: 1.4rem; }
.plans__sub { color: var(--gray-500); margin: 4px 0 16px; }

.table-wrap { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
thead { background: var(--gray-900); color: var(--white); }
th { text-align: left; padding: 16px 20px; font-weight: 600; font-size: .9rem; letter-spacing: .3px; }
td { padding: 16px 20px; border-bottom: 1px solid var(--gray-100); }
tbody tr { transition: background .15s; }
tbody tr:hover { background: var(--green-light); }
tbody tr:last-child td { border-bottom: 0; }
.pill {
    display: inline-block;
    background: var(--green-light);
    color: var(--green-dark);
    padding: 4px 14px;
    border-radius: 999px;
    font-weight: 600;
}

/* ================= FOOTER ================= */
.footer { background: var(--gray-900); color: #9aa2a9; text-align: center; padding: 20px; font-size: .85rem; }

/* ================= RESPONSIVE ================= */
@media (max-width: 760px) {
    .burger { display: block; }
    .user__name { display: none; }
    .nav {
        position: absolute;
        top: 68px; left: 0; right: 0;
        flex-direction: column;
        background: var(--gray-900);
        padding: 10px 20px 18px;
        display: none;
        border-bottom: 4px solid var(--green);
    }
    .nav.open { display: flex; }
    .grid-2 { grid-template-columns: 1fr; }
    .remaining__info { text-align: left; }

    thead { display: none; }
    table, tbody, tr, td { display: block; width: 100%; }
    tr { padding: 12px 0; border-bottom: 1px solid var(--gray-300); }
    td { border: 0; padding: 6px 20px; display: flex; justify-content: space-between; }
    td::before { content: attr(data-label); color: var(--gray-500); font-size: .85rem; }
}
