
/* =========================================================
   IQRANIX ACCOUNT — CLEAN WHITE DESIGN
========================================================= */

:root {
    --account-bg: #ffffff;
    --account-card: #ffffff;
    --account-primary: #087a50;
    --account-primary-dark: #07583c;
    --account-text: #17251e;
    --account-muted: #89938d;
    --account-border: #eeeeee;
    --account-danger: #dc4545;
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: #ffffff;
    color: var(--account-text);
    font-family: "DM Sans", Arial, sans-serif;
    padding-bottom: calc(85px + env(safe-area-inset-bottom));
}

button,
input,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.app-shell {
    width: 100%;
    max-width: 760px;
    min-height: 100vh;
    margin: 0 auto;
    background: #ffffff;
    position: relative;
}

/* HEADER */

.account-header {
    height: 62px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.97);
    border-bottom: 1px solid var(--account-border);
    backdrop-filter: blur(15px);
}

.header-username {
    flex: 1;
    text-align: center;
    font-size: 17px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: none;
    background: transparent;
    color: var(--account-text);
    border-radius: 50%;
}

.header-icon:active {
    background: #f3f6f4;
}

.header-icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.header-actions {
    display: flex;
    align-items: center;
}

.settings-menu {
    position: absolute;
    top: 55px;
    right: 15px;
    width: 190px;
    padding: 7px;
    background: white;
    border: 1px solid var(--account-border);
    border-radius: 13px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.10);
    z-index: 300;
}

.settings-menu button {
    width: 100%;
    padding: 13px;
    border: none;
    background: transparent;
    text-align: left;
    color: var(--account-text);
    border-radius: 8px;
    font-size: 14px;
}

.settings-menu button:active {
    background: #f5f7f5;
}

.settings-menu .danger-option {
    color: var(--account-danger);
}

.hidden {
    display: none !important;
}

/* PROFILE */

.profile-section {
    background: #ffffff;
    padding: 25px 20px 22px;
    border-bottom: 1px solid var(--account-border);
}

.profile-main {
    display: flex;
    align-items: center;
    gap: 16px;
}

.avatar-wrap {
    width: 86px;
    height: 86px;
    flex-shrink: 0;
    padding: 3px;
    border-radius: 50%;
    background: linear-gradient(135deg, #087a50, #b8ddc8);
    overflow: hidden;
}

.avatar-wrap img,
.avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: #f0f5f1;
}

.avatar-fallback {
    display: grid;
    place-items: center;
    color: var(--account-primary);
    font-size: 28px;
    font-weight: 800;
}

.profile-identity {
    min-width: 0;
}

.profile-identity h2 {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.4px;
    overflow-wrap: anywhere;
}

.profile-identity p {
    margin-top: 5px;
    color: var(--account-muted);
    font-size: 13px;
}

.profile-bio {
    margin-top: 16px;
    color: #48574e;
    font-size: 14px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

/* PROFILE STATS */

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 22px;
    padding: 16px 0;
    border-top: 1px solid var(--account-border);
    border-bottom: 1px solid var(--account-border);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-item strong {
    font-size: 19px;
    font-weight: 800;
}

.stat-item span {
    color: var(--account-muted);
    font-size: 12px;
}

/* PROFILE BUTTONS */

.profile-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 17px;
}

.primary-action,
.secondary-action {
    min-height: 43px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    transition: 0.2s ease;
}

.primary-action {
    background: var(--account-primary);
    color: white;
    border: 1px solid var(--account-primary);
}

.primary-action:active {
    background: var(--account-primary-dark);
}

.secondary-action {
    background: white;
    color: var(--account-text);
    border: 1px solid #dfe5e1;
}

.secondary-action:active {
    background: #f7f9f7;
}

/* DISCOVER PEOPLE */

.discover-section {
    background: #ffffff;
    padding: 23px 18px;
    border-bottom: 1px solid var(--account-border);
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 17px;
}

.eyebrow {
    color: var(--account-primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.section-heading h2 {
    margin-top: 5px;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 22px;
    font-weight: 700;
}

.suggested-users {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 2px 0 8px;
    scrollbar-width: none;
}

.suggested-users::-webkit-scrollbar {
    display: none;
}

.suggestion-loading,
.suggestion-empty {
    color: var(--account-muted);
    font-size: 13px;
    padding: 10px 0;
}

.suggestion-card {
    min-width: 145px;
    max-width: 145px;
    padding: 15px 10px;
    border: 1px solid var(--account-border);
    border-radius: 13px;
    display: flex;
    align-items: center;
    flex-direction: column;
    text-align: center;
    background: #ffffff;
}

.suggestion-avatar,
.suggestion-fallback {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 9px;
    background: #f0f5f1;
}

.suggestion-fallback {
    display: grid;
    place-items: center;
    color: var(--account-primary);
    font-size: 20px;
    font-weight: 800;
}

.suggestion-name {
    max-width: 100%;
    font-size: 13px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.suggestion-username {
    margin-top: 3px;
    color: var(--account-muted);
    font-size: 11px;
    overflow-wrap: anywhere;
}

.follow-button {
    width: 100%;
    margin-top: 12px;
    padding: 8px;
    border: none;
    border-radius: 8px;
    background: var(--account-primary);
    color: white;
    font-size: 12px;
    font-weight: 700;
}

.follow-button:disabled {
    opacity: 0.65;
}

/* POSTS AND REELS */

.content-section {
    background: #ffffff;
    min-height: 350px;
}

.content-tabs {
    height: 55px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid var(--account-border);
}

.content-tab {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 9px;
    border: none;
    border-bottom: 2px solid transparent;
    background: white;
    color: #929d96;
    font-size: 13px;
    font-weight: 700;
}

.content-tab.active {
    color: var(--account-primary);
    border-bottom-color: var(--account-primary);
}

.content-tab svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.content-panel {
    display: none;
}

.content-panel.active {
    display: block;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    min-height: 220px;
}

.content-tile {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f5f7f5;
    cursor: pointer;
}

.content-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tile-text {
    width: 100%;
    height: 100%;
    padding: 12px;
    display: grid;
    place-items: center;
    text-align: center;
    font-size: 12px;
    line-height: 1.5;
    color: #526157;
    background: #f7f9f7;
    overflow-wrap: anywhere;
}

.reel-play {
    position: absolute;
    top: 9px;
    right: 9px;
    color: white;
    font-size: 17px;
    text-shadow: 0 1px 5px rgba(0,0,0,0.7);
}

.delete-reel {
    position: absolute;
    left: 6px;
    bottom: 6px;
    padding: 5px 9px;
    border: none;
    border-radius: 6px;
    background: rgba(0,0,0,0.65);
    color: white;
    font-size: 10px;
    z-index: 2;
}

.content-loading {
    grid-column: 1 / -1;
    padding: 45px 15px;
    text-align: center;
    color: var(--account-muted);
    font-size: 13px;
}

.empty-content {
    grid-column: 1 / -1;
    padding: 45px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    color: var(--account-muted);
}

.empty-icon {
    width: 55px;
    height: 55px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #f0f5f1;
    color: var(--account-primary);
    font-size: 25px;
}

.empty-content p {
    max-width: 250px;
    font-size: 13px;
    line-height: 1.6;
}

/* MODALS */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(4px);
}

.modal-overlay.hidden {
    display: none !important;
}

.modal-card {
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 25px 21px;
    border-radius: 18px;
    background: white;
    box-shadow: 0 20px 60px rgba(0,0,0,0.16);
}

.modal-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.modal-heading h2 {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 23px;
}

.close-button {
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 50%;
    background: #f2f4f2;
    color: var(--account-text);
    font-size: 24px;
}

.modal-card label {
    display: block;
    margin: 15px 0 7px;
    font-size: 12px;
    font-weight: 700;
}

.modal-card input,
.modal-card textarea {
    width: 100%;
    padding: 13px;
    border: 1px solid #dfe5e1;
    border-radius: 9px;
    outline: none;
    background: white;
    color: var(--account-text);
    font-size: 14px;
}

.modal-card input:focus,
.modal-card textarea:focus {
    border-color: var(--account-primary);
    box-shadow: 0 0 0 3px rgba(8,122,80,0.08);
}

.modal-card textarea {
    resize: vertical;
    min-height: 90px;
}

.form-status {
    margin-top: 10px;
    color: var(--account-danger);
    font-size: 12px;
    line-height: 1.5;
}

.save-button {
    width: 100%;
    margin-top: 17px;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: var(--account-primary);
    color: white;
    font-size: 14px;
    font-weight: 800;
}

.save-button:disabled {
    opacity: 0.6;
}

/* SHARE PROFILE */

.share-card > p {
    color: var(--account-muted);
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.share-link-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px;
    border: 1px solid var(--account-border);
    border-radius: 10px;
    background: #ffffff;
}

.share-link-row span {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 11px;
    color: #536258;
}

.share-link-row button {
    padding: 9px 13px;
    border: none;
    border-radius: 8px;
    background: var(--account-primary);
    color: white;
    font-size: 12px;
    font-weight: 700;
}

/* SHARED NAVIGATION MOUNT */

#communityNavMount {
    position: relative;
    z-index: 500;
}

/* RESPONSIVE */

@media (min-width: 600px) {
    .profile-section {
        padding: 30px;
    }

    .discover-section {
        padding: 28px;
    }

    .avatar-wrap {
        width: 100px;
        height: 100px;
    }

    .profile-identity h2 {
        font-size: 23px;
    }
}

@media (max-width: 380px) {
    .profile-section {
        padding: 20px 14px;
    }

    .avatar-wrap {
        width: 75px;
        height: 75px;
    }

    .profile-identity h2 {
        font-size: 17px;
    }

    .stat-item strong {
        font-size: 17px;
    }

    .suggestion-card {
        min-width: 130px;
        max-width: 130px;
    }
}
