:root {
    --green-1: #0a3f1c;
    --green-2: #0f6b33;
    --green-3: #11a94b;
    --bg: #f2fff5;
    --card: #ffffff;
    --muted: #7b8a8f;
    --border: #e7efe8;
    --shadow: 0 8px 20px rgba(0, 0, 0, .06);
}

* {
    box-sizing: border-box
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial
}

img {
    display: block;
    max-width: 100%
}

.navbar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 10px
}

.brand-logo {
    width: 34px;
    height: 34px
}

.brand-name {
    font-weight: 700;
    color: #174f2d
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px
}

.counter {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f6faf6;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border)
}

.counter img {
    width: 16px;
    height: 16px
}

.copy-pill {
    border: none;
    background: var(--green-3);
    color: #fff;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
}

.hero {
    background: linear-gradient(180deg, var(--green-2), var(--green-1));
    color: #fff;
    text-align: center;
    padding: 28px 16px 36px;
}

.hero-badge {
    width: 64px;
    height: 64px;
    margin: 0 auto 8px;
    border-radius: 50%
}

.hero h1 {
    margin: 6px 0 4px;
    font-size: 28px
}

.hero p {
    margin: 0;
    opacity: .9;
    font-size: 14px
}

.page {
    max-width: 1200px;
    margin: 16px auto;
    display: grid;
    gap: 18px;
    grid-template-columns: 1fr 320px;
    padding: 0 12px;
}

/* Cards */
.cards-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-content: start;
}

.card {
    background: var(--card);
    border-radius: 14px;
    padding: 14px 14px 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.card-head {
    display: flex;
    justify-content: space-between;
    align-items: center
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #ffeceb;
    display: grid;
    place-items: center;
    overflow: hidden
}

.avatar img {
    width: 28px;
    height: 28px;
    object-fit: contain
}

.heart-btn {
    border: none;
    background: #f7fbf8;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    cursor: pointer
}

.heart-btn img {
    width: 16px;
    height: 16px;
    opacity: .8
}

.heart-btn:active {
    transform: scale(.96)
}

.card-body h3 {
    margin: 0 0 4px;
    font-size: 16px;
    color: #173d25
}

.meta {
    color: var(--muted);
    font-size: 12px
}

.number {
    font-size: 22px;
    font-weight: 800;
    margin: 6px 0 6px;
    color: #111;
}

.badge {
    font-size: 12px;
    background: #eef3ee;
    color: #4a6b54;
    border-radius: 999px;
    padding: 4px 10px;
    display: inline-block;
    border: 1px solid var(--border)
}

.card-actions {
    display: flex;
    gap: 10px
}

.btn {
    flex: 1;
    border: none;
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    font-weight: 600;
}

.btn-copy {
    background: #f1f5f2
}

.btn-copy:hover {
    background: #e7eee9
}

.btn-call {
    background: #12a84b;
    color: #fff
}

.btn-call:hover {
    background: #0e9440
}

.btn-clear {
    background: #ff4d4f;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 6px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease-in-out;
}

.btn-clear:hover {
    background: #e04345;
}

/* History */
.history {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 14px;
    height: max-content;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px
}

.history .title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #173d25
}

.history .title img {
    width: 18px;
    height: 18px
}

.history-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #fff;
    border-radius: 10px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    font-size: 14px;
}

.history-item .info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.history-item .name {
    font-weight: 600;
    color: #111;
}

.history-item .number {
    font-size: 13px;
    color: #666;
}

.history-item .time {
    font-size: 12px;
    color: #999;
}

@media (max-width: 480px) {
    .page {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .card {
        padding: 12px;
        border-radius: 10px;
    }

    .card-body h3 {
        font-size: 14px;
    }

    .number {
        font-size: 18px;
    }

    .btn {
        padding: 8px 10px;
        font-size: 13px;
    }

    .btn-clear {
        padding: 5px 14px;
        font-size: 12px;
    }

    .history {
        padding: 12px;
        border-radius: 10px;
    }

    .history-item {
        padding: 10px;
        font-size: 13px;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .history-item .time {
        align-self: flex-end;
    }

    .brand-logo {
        width: 28px;
        height: 28px;
    }

    .brand-name {
        font-size: 14px;
    }

    .hero h1 {
        font-size: 22px;
    }

    .hero p {
        font-size: 12px;
    }
}