:root {
    --bg: #fff;
    --card: #ffffff;
    --text: #050505;
    --text-2: #65676b;
    --line: #dadde1;
    --blue: #1877f2;
    --blue-soft: #e7f3ff;
    --green: #31a24c;
    --green-soft: #e6f4ea;
    --red: #e41e3f;
    --red-soft: #fdecef;
    --hover: #f2f2f2;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 64px;
}

body {
    font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--card);
    padding: env(safe-area-inset-top, 0px) 1rem 0;
}

.topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.back {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-weight: 600;
    font-size: 1.05rem;
}

.back:hover {
    text-decoration: none;
}

.round-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px !important;
    background: #e4e6eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
}

.round-btn:hover {
    background: #d8dadf;
    text-decoration: none;
    transform: translateX(-3px);
}

.home-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: var(--blue);
    color: #fff;
    padding: .5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: .85rem;
}

.home-btn:hover {
    background: #166fe5;
    text-decoration: none;
}

.profile-top {
    background: var(--card);
    margin-top: 3px !important;
}

.profile-wrap {
    max-width: 1100px;
    margin: 0 auto;
}

.cover {
    height: clamp(180px, 26vw, 300px);
    background: linear-gradient(135deg, #1877f2 0%, #0a4aa8 45%, #0b2a5b 100%);
    position: relative;
    overflow: hidden;
    border-bottom-right-radius: 30px !important;
    border-bottom-left-radius: 30px !important;
}

.cover::before,
.cover::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .07);
}

.cover::before {
    width: 420px;
    height: 420px;
    right: -80px;
    top: -140px;
}

.cover::after {
    width: 280px;
    height: 280px;
    left: 12%;
    bottom: -150px;
}

.identity {
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
    padding: 0 2rem 1.25rem;
    position: relative;
}

.avatar {
    width: 168px;
    height: 168px;
    border-radius: 50%;
    border: 5px solid var(--card);
    background: linear-gradient(135deg, #1877f2, #0a4aa8);
    color: #fff;
    font-size: 3.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: -84px;
}

.id-text {
    flex: 1;
    padding-bottom: .6rem;
    min-width: 0;
}

.id-text h1 {
    font-size: 1.75rem;
    font-weight: 500 !important;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.id-meta {
    color: var(--text-2);
    font-weight: 500;
    font-size: .9rem;
    margin-top: .2rem;
}

.id-sub {
    color: var(--text-2);
    font-size: .85rem;
    margin-top: .1rem;
}

.id-actions {
    display: flex;
    gap: .5rem;
    padding-bottom: .7rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: .85rem;
    border: none;
    white-space: nowrap;
    cursor: pointer;
    font-family: inherit;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background: var(--blue);
    color: #fff;
}

.btn-primary:hover {
    background: #166fe5;
}

.btn-secondary {
    background: #e4e6eb;
    color: var(--text);
}

.btn-secondary:hover {
    background: #d8dadf;
}

.tabs {
    margin: 0 2rem;
    display: flex;
    gap: .25rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab {
    padding: .9rem 1rem;
    font-weight: 300 !important;
    font-size: .88rem;
    color: var(--text-2);
    white-space: nowrap;
    border-radius: 40px;
}

.tab:hover {
    background: var(--hover);
    text-decoration: none;
}

.tab.active {
    color: var(--blue);
    background: var(--blue-soft);
}

.tab.active:hover {
    background: var(--blue-soft);
}

.layout {
    max-width: 1100px;
    margin: 1rem auto 2rem;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 1rem;
    align-items: start;
}

.col-left {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.side-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.col-right {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.card {
    background: var(--blue-soft);
    padding: 1rem 1.25rem;
    border-radius: 30px;
}

.card h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: .75rem;
    display: flex;
    align-items: center;
    gap: .6rem;
}

.card h2 i {
    color: var(--blue);
    font-size: 1.05rem;
}

.card h3 {
    font-size: .95rem;
    font-weight: 600;
    margin-bottom: .6rem;
}

.body-text {
    color: #1c1e21;
    font-size: .88rem;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.intro-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .85rem;
}

.intro-list li {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    font-size: .88rem;
}

.intro-list i {
    width: 20px;
    text-align: center;
    color: #8a8d91;
    margin-top: .25rem;
    flex-shrink: 0;
}

.intro-list span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.mv-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.mv-box {
    background: var(--bg);
    padding: 1rem;
    border-radius: 30px;
}

.mv-box h3 {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.mv-box .body-text {
    font-size: .85rem;
}

.mv-box h3 i {
    color: var(--blue);
}

.badge {
    display: inline-block;
    font-size: .68rem;
    font-weight: 600;
    padding: 0;
    vertical-align: middle;
    line-height: 1.5;
    white-space: nowrap;
}

.badge-blue {
    color: var(--blue);
}

.badge-green {
    color: var(--green);
}

.badge-red {
    color: var(--red);
}

.badge-grey {
    color: var(--text-2);
}

.post-head {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .9rem;
}

.post-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1877f2, #0a4aa8);
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.post-title {
    font-weight: 600;
    font-size: .95rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

.post-sub {
    font-size: .78rem;
    color: var(--text-2);
}

.post-sub i {
    margin-right: .15rem;
}

.detail {
    display: flex;
    gap: 1rem;
    padding: .45rem 0;
    font-size: .85rem;
}

.detail .k {
    width: 140px;
    flex-shrink: 0;
    color: var(--text-2);
    font-weight: 500;
}

.detail .v {
    flex: 1;
    min-width: 0;
    text-align: right;
    overflow-wrap: anywhere;
}

.pills {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: .9rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .45rem .9rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--text-2);
    font-family: inherit;
    font-size: .82rem;
    font-weight: 500;
    cursor: pointer;
}

.pill:hover {
    background: var(--hover);
}

.pill.active {
    background: var(--blue-soft);
    border-color: var(--blue-soft);
    color: var(--blue);
}

.hours-panel[hidden] {
    display: none;
}

.hours-branch-name {
    font-weight: 600;
    font-size: .9rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: .5rem;
}

.hours-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 1rem;
    padding: .4rem 0;
    font-size: .85rem;
}

.hours-day {
    font-weight: 500;
}

.hours-time {
    color: var(--text-2);
    min-width: 120px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.hours-status {
    min-width: 56px;
    text-align: center;
}

.bank-avatar {
    border-radius: 10px;
    background: var(--green-soft);
    color: var(--green);
    font-size: 1.05rem;
}

.note {
    font-size: .75rem;
    color: var(--text-2);
    padding: 0 .25rem;
}

.empty {
    text-align: center;
    color: var(--text-2);
    padding: 1.5rem 0;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .25rem .25rem 0;
}

.section-title i {
    color: var(--blue);
    font-size: 1rem;
}

@media (max-width: 980px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .col-left {
        display: contents;
    }

    .col-left>.card {
        order: 0;
    }

    .col-right {
        order: 1;
    }

    #contacts-wrap {
        order: 2;
    }

    #banking-wrap {
        order: 3;
    }

    .id-actions {
        justify-content: flex-start;
    }

    .identity {
        flex-wrap: wrap;
    }

    .id-text {
        flex: 1 1 260px;
    }

    .id-actions {
        flex: 1 1 100%;
        padding-bottom: 0;
    }
}

@media (max-width: 700px) {
    .identity {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0 1rem 1rem;
        gap: .75rem;
    }

    .avatar {
        width: 124px;
        height: 124px;
        font-size: 2.4rem;
        margin-top: -62px;
    }

    .id-text {
        padding-bottom: 0;
        flex: none;
        width: 100%;
    }

    .id-text h1 {
        font-size: 1.4rem;
    }

    .id-actions {
        justify-content: center;
        flex: none;
        width: 100%;
    }

    .tabs {
        margin: 0 .25rem;
    }

    .layout {
        padding: 0 .6rem;
    }

    .card {
        padding: .9rem 1rem;
    }

    .mv-grid {
        grid-template-columns: 1fr;
    }

    .detail {
        gap: .75rem;
    }

    .detail .k {
        width: auto;
        max-width: 42%;
    }

    .hours-row {
        gap: .5rem;
    }

    .hours-time {
        min-width: 0;
    }
}