/* Profil — Jut.su us2 dizayni */

.profile-page-zn {
    padding: calc(var(--nav-height) + 1rem) 0 calc(var(--bottom-nav-h) + var(--safe-bottom) + 2rem);
    max-width: 1100px;
    margin: 0 auto;
}

.us2 {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.us2__one {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.us2__header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.us2__img {
    flex-shrink: 0;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--border);
    background: var(--bg-elevated);
}

.us2__img img,
.us2__avatar-letter {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary, #e91e8c);
}

.us2__main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.us2__name {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
}

.us2__status {
    font-size: 0.82rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.us2__status.on::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #66bb6a;
    box-shadow: 0 0 0 3px rgba(102, 187, 106, 0.25);
}

.us2__group {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.us2__group .pill-btn {
    font-size: 0.75rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(233, 30, 140, 0.15);
    color: var(--primary, #e91e8c);
    border: 1px solid rgba(233, 30, 140, 0.25);
}

.us2__group .pill-btn--royal {
    background: rgba(76, 175, 80, 0.15);
    color: #a5d6a7;
    border-color: rgba(76, 175, 80, 0.3);
}

.us2__menus {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.us2__menus-link {
    flex: 1;
    min-width: 120px;
    text-align: center;
    padding: 0.55rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: border-color 0.15s, color 0.15s;
}

.us2__menus-link:hover {
    border-color: var(--primary, #e91e8c);
    color: var(--primary, #e91e8c);
}

.us2__two {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding: 1.25rem;
    align-items: flex-start;
}

.us2__info {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    flex: 1 1 320px;
}

@media (min-width: 640px) {
    .us2__info {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.us2__info-item {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.75rem 0.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    min-height: 72px;
}

.us2__info-item b {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.1;
}

.us2__info-item span {
    font-size: 0.68rem;
    color: var(--text-muted);
    line-height: 1.25;
    text-align: center;
}

.us2__info-item.stat-rating--default b { color: var(--text-muted); }
.us2__info-item.stat-rating--blue {
    border-color: rgba(66, 133, 244, 0.45);
    background: rgba(66, 133, 244, 0.08);
}
.us2__info-item.stat-rating--blue b { color: #5b9bf5; }
.us2__info-item.stat-rating--green {
    border-color: rgba(76, 175, 80, 0.45);
    background: rgba(76, 175, 80, 0.08);
}
.us2__info-item.stat-rating--green b { color: #6fcf73; }
.us2__info-item.stat-rating--purple {
    border-color: rgba(156, 89, 214, 0.45);
    background: rgba(156, 89, 214, 0.08);
}
.us2__info-item.stat-rating--purple b { color: #b57bee; }
.us2__info-item.stat-rating--gold {
    border-color: rgba(255, 193, 7, 0.5);
    background: rgba(255, 193, 7, 0.1);
}
.us2__info-item.stat-rating--gold b { color: #ffc107; }

.profile-joined-sub span:last-child {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.profile-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.profile-preview-head h3 {
    margin: 0;
    font-size: 1rem;
}

.profile-more-link {
    font-size: 0.85rem;
    color: var(--accent);
    text-decoration: none;
}

.profile-preview-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

a.profile-edit-open-btn {
    text-decoration: none;
    color: inherit;
}

.us2__info-ext {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1 1 260px;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.us2__info-ext li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.85rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--border);
}

.us2__info-ext li span:first-child {
    color: var(--text-muted);
}

.us2__info-ext li span:last-child {
    text-align: right;
    font-weight: 500;
}

.us2__tariff {
    padding: 0 1.25rem 1.25rem;
    border-top: 1px solid var(--border);
}

.us2__tariff h3 {
    margin: 1rem 0 0.5rem;
    font-size: 0.95rem;
}

.tariff-plans {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tariff-plan-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
}

.tariff-plan-btn small {
    opacity: 0.85;
    font-weight: 500;
}

/* Tabs — sevimlilar / tarix */
.utabs-profile {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

.tabs__caption {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
    background: var(--bg-elevated);
}

.tabs__caption .tabz {
    padding: 0.85rem 1.1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
    user-select: none;
}

.tabs__caption .tabz:hover {
    color: var(--text);
}

.tabs__caption .tabz.active {
    color: var(--primary, #e91e8c);
    border-bottom-color: var(--primary, #e91e8c);
}

.tabs__caption .tabz .count {
    font-weight: 500;
    opacity: 0.75;
}

.tabs-searchform {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

.tabs-searchform input {
    flex: 1;
    min-width: 180px;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text);
    font-size: 0.88rem;
}

.utabs-profile .news-list {
    padding: 1rem;
    min-height: 120px;
}

.utabs-profile .catalog-grid-pro {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.85rem;
}

.utabs-profile .history-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.utabs-profile .history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    font-size: 0.88rem;
}

.utabs-profile .history-item:hover {
    border-color: var(--primary, #e91e8c);
}

.profile-page-zn .empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
}

.profile-verify-row {
    padding: 0 1.25rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.profile-guest-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    max-width: 480px;
    margin: 0 auto;
}

.profile-guest-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin: 1rem 0;
}

/* —— Tahrirlash tugmasi —— */
.us2__edit-trigger {
    border-bottom: none !important;
    padding-top: 0.75rem !important;
}

.profile-edit-open-btn__icon { font-size: 1.15rem; }
.profile-edit-open-btn__text { flex: 1; text-align: left; }
.profile-edit-open-btn__arrow {
    font-size: 1.25rem;
    opacity: 0.5;
    font-weight: 400;
}

/* —— Tahrirlash paneli —— */
.profile-edit-panel {
    padding: 0 1.25rem 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--bg-elevated);
}

.profile-edit-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 0 0.85rem;
    position: sticky;
    top: var(--nav-height, 56px);
    z-index: 5;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
}

.profile-edit-head h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
}

/* —— Form kartochkalari —— */
.profile-form-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.15rem 1.25rem;
    margin-bottom: 1rem;
}

.profile-form-card__title {
    margin: 0 0 1rem;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.profile-form-card__lead {
    margin: -0.5rem 0 1rem;
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.profile-form-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

.profile-form-grid--2 {
    grid-template-columns: 1fr;
}

@media (min-width: 520px) {
    .profile-form-grid--2 {
        grid-template-columns: 1fr 1fr;
    }
}

.profile-field {
    margin-bottom: 1rem;
}

.profile-field:last-child {
    margin-bottom: 0;
}

.profile-field label {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.45rem;
}

.profile-field-hint {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
}

.profile-input {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.35;
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
    appearance: none;
}

.profile-input:focus {
    outline: none;
    border-color: var(--primary, #e91e8c);
    box-shadow: 0 0 0 3px rgba(233, 30, 140, 0.15);
}

.profile-textarea {
    min-height: 110px;
    resize: vertical;
    line-height: 1.5;
}

.profile-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23888' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* —— Avatar bloki —— */
.profile-avatar-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.15rem;
    text-align: center;
}

@media (min-width: 520px) {
    .profile-avatar-block {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
    }
}

.profile-avatar-preview {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary, #e91e8c);
    box-shadow: 0 8px 24px rgba(233, 30, 140, 0.2);
    background: var(--bg-elevated);
    flex-shrink: 0;
}

.profile-avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-preview__letter {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary, #e91e8c);
}

.profile-avatar-actions {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    flex: 1;
    width: 100%;
    max-width: 320px;
}

/* —— Maxfiylik —— */
.profile-privacy-block {
    margin-bottom: 0;
}

.profile-privacy-bulk {
    margin-bottom: 1rem;
}

.profile-privacy-toggles .privacy-toggle {
    min-height: 52px;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.92rem;
}

.profile-privacy-toggles .privacy-toggle span:last-child {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: var(--bg-elevated);
}

.profile-privacy-toggles .privacy-toggle.on span:last-child {
    color: #66bb6a;
    background: rgba(102, 187, 106, 0.12);
}

.profile-privacy-toggles .privacy-toggle.off span:last-child {
    color: var(--text-muted);
}

.profile-verify-row {
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Davom ettirish — profil sahifasida */
.profile-page-zn .continue-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.profile-page-zn .continue-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.65rem;
    text-decoration: none;
    color: inherit;
}
.profile-page-zn .continue-bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
}
.profile-page-zn .continue-bar div {
    height: 100%;
    background: var(--primary, #e91e8c);
    border-radius: 2px;
}

.profile-more-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    font-weight: 600;
    text-decoration: none;
    color: var(--primary, #e91e8c);
}
.profile-more-link:hover {
    border-color: var(--primary, #e91e8c);
}

.verify-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    vertical-align: middle;
}
.verify-badge--verified {
    color: #66bb6a;
    background: rgba(102, 187, 106, 0.12);
    border: 1px solid rgba(102, 187, 106, 0.3);
}
.verify-badge--pending {
    color: #ffb74d;
    background: rgba(255, 183, 77, 0.12);
    border: 1px solid rgba(255, 183, 77, 0.3);
}
.verify-badge--unverified {
    color: var(--text-muted);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
}
.verify-value {
    margin-left: 0.35rem;
    font-weight: 500;
}

.settings-brand-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}
.settings-brand-head h2 {
    margin: 0 0 0.25rem;
    font-size: 1.1rem;
}
.settings-brand-logo {
    flex-shrink: 0;
    border-radius: 12px;
}
.settings-profile-view {
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.65rem 0.85rem !important;
    background: var(--bg-elevated);
}
.settings-profile-view:hover {
    border-color: var(--primary, #e91e8c);
    color: var(--primary, #e91e8c);
}

html[data-tg-webapp="1"] #settings-guest:not(.hidden) .tg-only-retry {
    display: block !important;
}
html[data-tg-webapp="1"] #settings-guest:not(.hidden) #settings-login-btn {
    display: none;
}

/* Sozlamalar — tasdiqlangan email/telefon */
.settings-verified-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--primary, #e91e8c) 35%, var(--border));
    background: color-mix(in srgb, var(--primary, #e91e8c) 8%, var(--bg-elevated));
}
.settings-verified-value {
    flex: 1;
    min-width: 0;
    font-size: 0.95rem;
}
.settings-verify-code-row {
    margin-top: 0.25rem;
}
.settings-verify-actions {
    margin-top: 0.25rem;
}
.settings-password--locked {
    opacity: 0.92;
}
.settings-password-hint {
    margin: 0 0 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px dashed var(--border);
    background: var(--bg-elevated);
    color: var(--text-muted);
}
.settings-pw-code-row {
    margin-top: 0.25rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border);
}
.settings-pw-code-hint {
    margin: 0.35rem 0 0;
    font-size: 0.82rem;
}
