
@font-face {
    font-family: "Vazirmatn";
    src: url("./Vazirmatn-Bold.woff2") format("woff2");
    font-weight: 700 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --green: #176b45;
    --green-dark: #104d33;
    --green-light: #e8f4ed;
    --page: #f3f7f4;
    --text: #1c2922;
    --muted: #78857d;
    --border: #e3ebe5;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: "Vazirmatn", Tahoma, sans-serif;
    color: var(--text);
    background: var(--page);
    line-height: 1.9;
}

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

button {
    font: inherit;
}

/* سربرگ */

.messenger-header {
    min-height: 82px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.messenger-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: 17px;
    color: white;
    background: linear-gradient(145deg, #27885b, #125437);
    font-size: 27px;
    font-weight: 900;
}

.brand-copy {
    display: flex;
    flex-direction: column;
}

.brand-copy strong {
    font-size: 15px;
    font-weight: 900;
}

.brand-copy small {
    color: var(--muted);
    font-size: 11px;
}

.account-button {
    padding: 9px 13px;
    border: 1px solid #dce8df;
    border-radius: 13px;
    background: #f8fbf9;
    color: var(--green);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

/* صفحه اصلی */

.messenger-main {
    width: min(850px, calc(100% - 24px));
    margin: 22px auto;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: white;
    box-shadow: 0 8px 28px rgba(22, 73, 47, 0.06);
}

/* سه تب در یک ردیف */

.messenger-tabs {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    flex-direction: row !important;
    gap: 6px;
    width: 100%;
    padding: 8px;
    background: #f8fbf9;
    border-bottom: 1px solid var(--border);
}

.messenger-tab {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    min-height: 46px;
    margin: 0;
    padding: 8px 4px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: #6f7e73;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
}

.messenger-tab.active {
    background: var(--green-light);
    color: var(--green);
    border-color: #cfe4d5;
}

.messenger-tab:active {
    transform: scale(0.98);
}

/* محتوای تب‌ها */

.panels-container {
    padding: 24px;
}

.tab-panel {
    margin-bottom: 26px;
}

.tab-panel[hidden] {
    display: none !important;
}

.list-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.list-heading h1 {
    margin: 0;
    font-size: 19px;
    font-weight: 900;
}

.list-heading p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.section-symbol {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: var(--green-light);
    font-size: 22px;
}

.channel-symbol,
.channel-avatar {
    background: #fff2dc;
}

/* کارت گروه و کانال */

.conversation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: #fff;
}

.conversation-item:active {
    background: #f8fbf9;
}

.conversation-avatar {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    font-size: 21px;
}

.ring-avatar {
    color: #fff;
    background: linear-gradient(145deg, #27885b, #125437);
    font-size: 17px;
    font-weight: 900;
}

.conversation-details {
    flex: 1;
    min-width: 0;
}

.conversation-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.conversation-title h2 {
    margin: 0;
    font-size: 14px;
    font-weight: 900;
}

.member-status {
    padding: 2px 8px;
    border-radius: 20px;
    background: var(--green-light);
    color: var(--green);
    font-size: 10px;
    font-weight: 800;
}

.channel-status {
    background: #fff2dc;
    color: #98611a;
}

.conversation-details p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.conversation-arrow {
    flex-shrink: 0;
    color: var(--green);
    font-size: 21px;
}

/* پیام راهنما */

.empty-hint {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
    padding: 14px;
    border-radius: 14px;
    background: #f5f8f6;
    color: #69796e;
    font-size: 12px;
    line-height: 2.1;
}

.empty-hint p {
    margin: 0;
}

.security-notice {
    margin-top: 0;
    background: #f4f8f5;
}

/* پایین صفحه */

.messenger-footer {
    padding: 18px 12px 25px;
    color: #839087;
    text-align: center;
    font-size: 11px;
}

/* موبایل */

@media (max-width: 520px) {
    .messenger-header {
        min-height: 74px;
        padding: 10px 14px;
        gap: 8px;
    }

    .brand-icon {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
        border-radius: 14px;
        font-size: 24px;
    }

    .brand-copy strong {
        font-size: 13px;
    }

    .brand-copy small {
        font-size: 10px;
    }

    .account-button {
        padding: 8px 9px;
        font-size: 11px;
    }

    .messenger-main {
        margin: 16px auto;
        border-radius: 19px;
    }

    .messenger-tabs {
        gap: 4px;
        padding: 6px;
    }

    .messenger-tab {
        min-height: 44px;
        gap: 4px;
        padding: 7px 2px;
        font-size: 12px;
    }

    .panels-container {
        padding: 18px 14px;
    }

    .list-heading h1 {
        font-size: 17px;
    }

    .list-heading p {
        font-size: 11px;
    }

    .conversation-item {
        gap: 9px;
        padding: 11px 9px;
    }

    .conversation-avatar {
        width: 45px;
        height: 45px;
        flex-basis: 45px;
        font-size: 18px;
    }

    .ring-avatar {
        font-size: 14px;
    }

    .conversation-title h2 {
        font-size: 12px;
    }

    .conversation-details p {
        font-size: 10px;
    }

    .empty-hint {
        padding: 12px;
        font-size: 11px;
    }
}

@media (max-width: 350px) {
    .messenger-tab {
        gap: 3px;
        font-size: 11px;
    }

    .account-button {
        font-size: 10px;
        padding: 7px;
    }
}