@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Sora:wght@400;500;600;700;800&display=swap');

/* --- Linear/Stripe Inspired Luxury Light Theme --- */
:root {
    --bg-base: #fbfbfd;
    --bg-surface: #ffffff;
    --border-subtle: rgba(0, 0, 0, 0.06);
    --border-hover: rgba(79, 70, 229, 0.25);
    
    /* Branding Colors */
    --clr-primary: #4f46e5; /* Indigo Blue */
    --primary: #4f46e5;
    --clr-primary-rgb: 79, 70, 229;
    --clr-secondary: #0ea5e9; /* Sky Blue */
    --clr-accent: #f43f5e; /* Rose Crimson */
    --clr-success: #10b981; /* Emerald Active */
    --clr-white: #ffffff;
    
    --text-primary: #0f172a; /* Slate Black */
    --text-secondary: #475569; /* Slate Gray */
    --text-muted: #94a3b8;
    
    --font-header: 'Sora', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    --transition-slow: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.02), 0 4px 12px rgba(0,0,0,0.015);
    --shadow-md: 0 10px 25px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(0,0,0,0.02);
    --shadow-lg: 0 30px 60px rgba(79, 70, 229, 0.06), 0 2px 8px rgba(0,0,0,0.01);
}

/* --- Reset & Global --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-family: var(--font-body);
    background-color: var(--bg-base);
    color: var(--text-primary);
    overflow-x: hidden;
}

body {
    position: relative;
    min-height: 100vh;
    background-color: #fbfbfd;
    /* Soft mesh background overlays - NO hard grid lines */
    background-image: 
        radial-gradient(circle at 10% 15%, rgba(79, 70, 229, 0.05) 0%, transparent 45%),
        radial-gradient(circle at 90% 85%, rgba(14, 165, 233, 0.05) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(244, 63, 94, 0.02) 0%, transparent 35%);
    background-size: 100% 100%;
}

/* Faint overlay decorations */
.bg-orb {
    display: none; /* Hide background orbs to keep the design clean and neat */
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Header / Facebook style Navbar --- */
.fb-header {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    height: 56px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.fb-header-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 16px;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
    height: 100%;
}

/* Left Section: Logo (desktop only — hidden on mobile via @media below) */
.fb-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fb-header-left .logo {
    font-size: 26px;
    color: var(--clr-primary);
    max-width: min(100%, 220px);
}

.logo-wordmark {
    font-family: var(--font-header);
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.4px;
    color: var(--text-primary);
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 480px) {
    .logo-wordmark {
        font-size: 14px;
    }
}

/* Center Section: Navigation Tabs */
.fb-header-center {
    display: flex;
    justify-content: center;
    gap: 8px;
    height: 100%;
}

.fb-nav-tab {
    background: transparent;
    border: none;
    border-radius: 8px;
    padding: 0 40px;
    height: 48px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #65676b;
    font-size: 20px;
    transition: var(--transition-fast);
}

.fb-nav-tab:hover {
    background: #f0f2f5;
    color: var(--clr-primary);
}

.fb-nav-tab.active {
    color: var(--clr-primary);
}

.fb-nav-tab.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--clr-primary);
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

/* Right Section: Actions & Profile Widget */
.fb-header-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

.fb-user-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f0f2f5;
    padding: 4px 10px 4px 4px;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    color: inherit;
}

.fb-user-badge:hover {
    background: #e4e6eb;
}

.fb-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.fb-user-firstname {
    font-family: var(--font-header);
    font-weight: 700;
    font-size: 13.5px;
    color: var(--text-primary);
}

.fb-utility-btn {
    background: #e4e6eb;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 16px;
    transition: var(--transition-fast);
}

.fb-utility-btn:hover {
    background: #d8dadf;
}

.fb-utility-btn i {
    font-size: 16px;
}

.notifications-anchor {
    position: relative;
}

.messages-anchor,
.fb-nav-tab {
    position: relative;
}

.fb-message-badge,
.fb-notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #e41e3f;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

.notifications-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 360px;
    max-height: 420px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    z-index: 1200;
}

.notifications-dropdown.active {
    display: flex;
    flex-direction: column;
}

.notifications-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid #e4e6eb;
}

.notifications-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.notifications-mark-read {
    border: none;
    background: transparent;
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.notifications-mark-read:hover {
    text-decoration: underline;
}

.notifications-list {
    overflow-y: auto;
    max-height: 340px;
}

.notifications-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 48px 24px;
    color: #65676b;
    text-align: center;
}

.notifications-empty i {
    font-size: 28px;
}

.notification-item {
    border-bottom: 1px solid #f0f2f5;
}

.notification-item.unread {
    background: #e7f3ff;
}

.notification-link {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: inherit;
}

.notification-link:hover {
    background: #f0f2f5;
}

.notification-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.notification-content p {
    margin: 0 0 4px;
    font-size: 14px;
    line-height: 1.4;
    color: var(--text-primary);
}

.notification-content time {
    font-size: 12px;
    color: #65676b;
}

.notification-actions {
    display: flex;
    gap: 8px;
    padding: 0 16px 12px 84px;
}

.notification-actions .btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

@media (max-width: 992px) {
    .fb-nav-tab {
        padding: 0 20px;
    }
}

@media (max-width: 768px) {
    .notifications-dropdown {
        position: fixed;
        top: 56px;
        right: 8px;
        left: 8px;
        width: auto;
    }
}

@media (max-width: 768px) {
    .fb-header-container {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        padding: 0 12px;
    }
    .fb-header-left {
        display: flex;
        min-width: 0;
        flex-shrink: 1;
        grid-column: 1;
    }
    .fb-header-left .logo {
        max-width: 100%;
    }
    .fb-header-right {
        gap: 6px;
        flex-shrink: 0;
        grid-column: 2;
    }
    #header-auth-actions.header-actions {
        gap: 6px;
    }
    #header-auth-actions .btn-header-auth {
        width: auto;
        min-height: 32px;
        padding: 6px 11px;
        font-size: 12px;
        font-weight: 600;
        border-radius: 100px;
        white-space: nowrap;
        box-shadow: none;
    }
    #header-auth-actions .btn-primary.btn-header-auth {
        box-shadow: 0 2px 8px rgba(79, 70, 229, 0.18);
    }
    #header-auth-actions .btn-header-auth i {
        display: none;
    }
    .fb-user-firstname {
        display: none;
    }
    .fb-user-badge {
        padding: 4px;
    }
    .fb-header-center {
        display: none;
    }
    body {
        padding-bottom: 0;
    }
    .fb-mobile-nav {
        display: none !important;
    }

    /* Logged-in mobile: top tabs, no logo */
    body.mobile-auth-nav .fb-header-container {
        gap: 4px;
        padding: 0 8px;
    }

    body.mobile-auth-nav .fb-header-left {
        display: none;
    }

    body.mobile-auth-nav .fb-header-center {
        display: flex;
        justify-content: stretch;
        gap: 0;
        min-width: 0;
        grid-column: 1;
    }

    body.mobile-auth-nav .fb-header-right {
        grid-column: 2;
    }

    body.mobile-auth-nav .fb-nav-tab {
        flex: 1;
        min-width: 0;
        padding: 0 8px;
        height: 56px;
        border-radius: 0;
    }

    body.mobile-auth-nav .fb-nav-tab.active::after {
        bottom: 0;
    }
}

/* Mobile bottom navigation (deprecated — top header tabs used instead) */
.fb-mobile-nav {
    display: none !important;
}

.logo {
    font-family: var(--font-header);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.7px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.logo i {
    font-size: 20px;
    color: var(--clr-primary);
}

.logo-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: block;
}

/* Rounded Luxury Pill Buttons */
.btn-primary {
    background: var(--clr-primary);
    color: var(--clr-white);
    border: 1px solid var(--clr-primary);
    padding: 10px 24px;
    border-radius: 100px;
    font-family: var(--font-body);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

.btn-primary:hover {
    background: #3730a3;
    border-color: #3730a3;
    transform: translateY(-1.5px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.25);
}

.btn-secondary {
    background: #ffffff;
    color: var(--text-primary);
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 10px 24px;
    border-radius: 100px;
    font-family: var(--font-body);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: rgba(0, 0, 0, 0.15);
    transform: translateY(-1.5px);
}

/* --- Student Directory Page Content --- */
.discover {
    padding: 80px 0 120px 0;
}

.feed-page {
    padding: 80px 0 120px 0;
}

.feed-page-container {
    max-width: 680px;
}

.feed-page-title {
    margin-bottom: 24px;
}

.feed-posts {
    margin-top: 0;
}

.feed-pagination {
    margin-top: 24px;
    padding-bottom: 8px;
}

.feed-pagination-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.feed-pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #ffffff;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

a.feed-pagination-link:hover {
    border-color: rgba(79, 70, 229, 0.25);
    color: var(--clr-primary);
    background: #f5f3ff;
}

.feed-pagination-link.is-active {
    background: var(--clr-primary);
    border-color: var(--clr-primary);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

.feed-pagination-link.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

.fb-post-author-link {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.fb-post-author-link:hover {
    opacity: 0.85;
}

.fb-post-author-link:focus-visible {
    outline: 2px solid var(--clr-primary);
    outline-offset: 2px;
    border-radius: 8px;
}

.section-title {
    text-align: center;
    margin-bottom: 48px;
}

.section-title h2 {
    font-family: var(--font-header);
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -1.2px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.section-title p {
    font-size: 15.5px;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Floating Clean Pill Search Bar */
.search-box-container {
    max-width: 700px;
    margin: 0 auto 48px auto;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 100px;
    padding: 8px 8px 8px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition-slow);
    box-shadow: var(--shadow-sm);
}

.search-box-container:focus-within {
    border-color: var(--clr-primary);
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.08);
}

.search-icon {
    color: var(--clr-primary);
    font-size: 16px;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 15.5px;
    font-family: var(--font-body);
    font-weight: 500;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    background: #f1f5f9;
    color: var(--text-primary);
    border: none;
    padding: 10px 24px;
    border-radius: 100px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.search-btn:hover {
    background: var(--clr-black);
    color: var(--clr-white);
}

/* Discover toolbar — compact search & filters */
.discover-toolbar {
    max-width: 900px;
    margin: 0 auto 20px auto;
}

.discover-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
}

.discover-search {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 12px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: var(--transition-fast);
}

.discover-search:focus-within {
    background: #ffffff;
    border-color: rgba(79, 70, 229, 0.25);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
}

.discover-search i {
    color: var(--text-muted);
    font-size: 14px;
    flex-shrink: 0;
}

.discover-search:focus-within i {
    color: var(--clr-primary);
}

.discover-search input {
    flex: 1;
    min-width: 0;
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.4;
}

.discover-search input::placeholder {
    color: var(--text-muted);
}

.discover-search input::-webkit-search-cancel-button,
.discover-search input::-webkit-search-decoration {
    display: none;
}

.discover-filters {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.discover-filter-select {
    height: 38px;
    min-width: 0;
    max-width: 110px;
    padding: 0 28px 0 10px;
    background: #f8fafc;
    border: 1px solid transparent;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
    transition: var(--transition-fast);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
}

.discover-filter-select:hover {
    background-color: #f1f5f9;
}

.discover-filter-select:focus {
    border-color: var(--clr-primary);
    background-color: #ffffff;
}

.discover-filter-select.active-select {
    background-color: #eef2ff;
    border-color: rgba(79, 70, 229, 0.25);
    color: var(--clr-primary);
}

.discover-clear-btn {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 10px;
    background: #fef2f2;
    color: #dc2626;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.discover-clear-btn:hover {
    background: #fee2e2;
}

@media (max-width: 768px) {
    .discover-toolbar {
        margin-bottom: 16px;
    }

    .discover-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 10px;
        border-radius: 12px;
    }

    .discover-search {
        width: 100%;
        flex: none;
        height: 44px;
        min-height: 44px;
        padding: 0 14px;
        gap: 10px;
        background: #ffffff;
        border: 1px solid rgba(0, 0, 0, 0.1);
        border-radius: 12px;
        box-sizing: border-box;
    }

    .discover-search:focus-within {
        border-color: var(--clr-primary);
        box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
    }

    .discover-search i {
        font-size: 15px;
    }

    .discover-search input {
        font-size: 16px;
        height: 100%;
        padding: 0;
        -webkit-appearance: none;
        appearance: none;
    }

    .discover-filters {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr auto;
        gap: 6px;
        width: 100%;
    }

    .discover-filter-select {
        max-width: none;
        width: 100%;
        height: 40px;
        font-size: 13px;
    }

    .discover-clear-btn {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .discover-filters {
        grid-template-columns: 1fr 1fr auto;
        grid-template-rows: auto auto;
    }

    .discover-filter-select:nth-child(1) {
        grid-column: 1;
        grid-row: 1;
    }

    .discover-filter-select:nth-child(2) {
        grid-column: 2;
        grid-row: 1;
    }

    .discover-clear-btn {
        grid-column: 3;
        grid-row: 1;
        width: 40px;
        height: 40px;
    }

    .discover-filter-select:nth-child(3) {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

/* Legacy search bar (unused) */
.search-filter-bar {
    max-width: 800px;
    margin: 0 auto 32px auto;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 12px 16px;
    box-shadow: var(--shadow-sm);
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.search-input-wrapper i {
    color: var(--clr-primary);
    font-size: 16px;
}

.search-input-wrapper input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    font-family: var(--font-body);
    color: var(--text-primary);
    background: transparent;
}

.search-input-wrapper input::placeholder {
    color: var(--text-muted);
}

.filter-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-pill {
    flex: 1;
    min-width: 120px;
    background: #f8fafc;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 10px;
    padding: 8px 12px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
    transition: var(--transition-fast);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 14px;
    padding-right: 28px;
}

.filter-pill:hover {
    border-color: var(--clr-primary);
    background: #f5f3ff;
}

.filter-pill:focus {
    border-color: var(--clr-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Filters Layout */
.filters-wrapper {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 800px;
    margin: 0 auto 56px auto;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
    max-height: 400px;
    opacity: 1;
    overflow: visible;
    transform: translateY(0);
}

.compact-filters-bar {
    display: flex;
    gap: 16px;
    width: 100%;
    opacity: 1;
    transform: translateY(0);
}

.select-wrapper {
    position: relative;
    flex: 1;
    min-width: 160px;
    display: flex;
    align-items: center;
}

.select-icon {
    position: absolute;
    left: 16px;
    color: var(--clr-primary);
    font-size: 14px;
    pointer-events: none;
    z-index: 2;
}

.filter-select {
    width: 100%;
    background: #f8fafc;
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 12px 36px 12px 42px;
    border-radius: 12px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 13.5px;
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
    transition: var(--transition-fast);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 14px;
}

.filter-select:focus {
    border-color: var(--clr-primary);
    background-color: #ffffff;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.05);
}

/* Active selected filter style highlight */
.filter-select.active-select {
    border-color: var(--clr-primary);
    color: var(--clr-primary);
    background-color: #f5f3ff;
}

@media (max-width: 576px) {
    .compact-filters-bar {
        flex-direction: column;
        gap: 12px;
    }
    .select-wrapper {
        width: 100%;
    }
}

/* directory Grid and Premium Cards */
.directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 28px;
}

.directory-load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}

.directory-load-more-btn {
    min-width: 220px;
    padding: 12px 24px;
}

.student-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 20px;
    padding: 28px;
    transition: var(--transition-slow);
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.student-card:hover {
    transform: translateY(-6px);
    border-color: rgba(79, 70, 229, 0.2);
    box-shadow: var(--shadow-lg);
}

.student-card-clickable {
    cursor: pointer;
}

.student-card-clickable .card-actions {
    pointer-events: auto;
}

.student-card-clickable .student-header,
.student-card-clickable .student-bio,
.student-card-clickable .student-stats,
.student-card-clickable .tag-container {
    pointer-events: none;
}

.student-card-clickable .student-interests {
    pointer-events: auto;
}

/* Card Header */
.student-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.avatar-wrapper {
    position: relative;
    width: 60px;
    height: 60px;
}

.student-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: var(--transition-slow);
}

.student-card:hover .student-avatar {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.student-info h4 {
    font-family: var(--font-header);
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.student-dept {
    font-size: 10px;
    color: var(--clr-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #e0e7ff;
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-block;
}

.student-bio {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Statistics row */
.student-stats {
    display: flex;
    justify-content: space-between;
    padding-top: 12px;
    margin-bottom: 18px;
    border-top: 1px dashed rgba(0, 0, 0, 0.05);
    font-size: 11.5px;
    color: var(--text-secondary);
}

.student-stats span i {
    margin-right: 4px;
    color: var(--clr-primary);
}

/* Interest Tags */
.student-interests {
    margin-bottom: 20px;
}

.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-container.is-collapsed:not(.is-expanded) {
    max-height: 64px;
    overflow: hidden;
}

.tag-container-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    padding: 0;
    border: none;
    background: none;
    color: var(--clr-primary);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.tag-container-toggle.hidden {
    display: none;
}

.tag-container-toggle:hover {
    text-decoration: underline;
}

.tag-container-toggle:focus-visible {
    outline: 2px solid rgba(79, 70, 229, 0.35);
    outline-offset: 2px;
    border-radius: 4px;
}

.interest-tag {
    font-size: 11px;
    font-weight: 600;
    color: var(--clr-primary);
    background: #f5f3ff;
    border: 1px solid #e0e7ff;
    padding: 4px 10px;
    border-radius: 30px;
    transition: var(--transition-fast);
}

.student-card:hover .interest-tag {
    /* No background color change on hover */
}

/* Connection Button */
.btn-connect {
    width: 100%;
    background: #ffffff;
    color: var(--text-primary);
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 10px 0;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-connect:hover {
    background: var(--clr-primary);
    color: var(--clr-white);
    border-color: var(--clr-primary);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

.btn-connect.requested {
    background: #f0fdf4;
    color: var(--clr-success);
    border-color: rgba(16, 185, 129, 0.15);
    cursor: default;
    box-shadow: none;
    transform: none;
}

.btn-connect.requested:hover {
    background: #f0fdf4;
    color: var(--clr-success);
    border-color: rgba(16, 185, 129, 0.15);
}

/* Empty State */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border: 1px dashed rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
}

.no-results i {
    font-size: 40px;
    color: var(--clr-primary);
    margin-bottom: 16px;
    opacity: 0.8;
}

/* --- Registration Modal --- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    padding: 20px;
    overscroll-behavior: contain;
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 24px;
    width: 100%;
    max-width: 500px;
    padding: 36px;
    position: relative;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    max-height: calc(100vh - 40px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.06);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-close:hover {
    color: var(--clr-primary);
    border-color: var(--clr-primary);
    background: #f5f3ff;
}

.modal-content h3 {
    font-family: var(--font-header);
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.modal-content p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-family: var(--font-header);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--clr-primary);
    margin-bottom: 8px;
}

.form-help {
    margin-top: -2px;
    margin-bottom: 10px;
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.form-control {
    width: 100%;
    background: #f8fafc;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14.5px;
    font-weight: 500;
    outline: none;
    transition: var(--transition-slow);
}

.form-control:focus {
    border-color: var(--clr-primary);
    background: #ffffff;
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.08);
}

.bio-field {
    position: relative;
}

.bio-field-input {
    padding-right: 48px;
}

.bio-generate-btn {
    position: absolute;
    right: 10px;
    top: 10px;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #ffffff;
    color: var(--clr-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.bio-generate-btn:hover {
    background: #f5f3ff;
    border-color: rgba(79, 70, 229, 0.25);
}

.bio-generate-btn:active {
    transform: translateY(1px);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 42px;
}

.interest-checkboxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 4px;
}

.interest-picker {
    margin-top: 4px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    overflow: hidden;
    background: #fafbfc;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.interest-picker:focus-within {
    border-color: rgba(79, 70, 229, 0.35);
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.08);
}

.interest-picker-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #f8fafc;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.interest-picker-search i {
    color: var(--text-muted);
    font-size: 13px;
}

.interest-picker-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    font-family: var(--font-body);
    background: transparent;
    color: var(--text-primary);
}

.interest-picker-input::placeholder {
    color: var(--text-muted);
}

.interest-picker-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
    min-height: 38px;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    background: #ffffff;
    max-height: 72px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.interest-picker-tag {
    font-size: 12px;
    font-weight: 600;
    color: var(--clr-primary);
    background: #f5f3ff;
    border: 1px solid rgba(79, 70, 229, 0.18);
    padding: 5px 10px;
    border-radius: 999px;
    line-height: 1;
}

.interest-picker-hint {
    font-size: 12.5px;
    color: var(--text-muted);
}

.interest-picker-list {
    display: flex;
    flex-direction: column;
    max-height: 220px;
    overflow-y: auto;
    padding: 6px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.interest-picker-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.interest-picker-option:hover {
    background: rgba(79, 70, 229, 0.06);
}

.interest-picker-option.hidden {
    display: none;
}

.interest-picker-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.interest-picker-check {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0, 0, 0, 0.15);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.interest-picker-check i {
    font-size: 10px;
    color: #ffffff;
    opacity: 0;
    transform: scale(0.5);
    transition: var(--transition-fast);
}

.interest-picker-option input:checked ~ .interest-picker-check {
    background: var(--clr-primary);
    border-color: var(--clr-primary);
}

.interest-picker-option input:checked ~ .interest-picker-check i {
    opacity: 1;
    transform: scale(1);
}

.interest-picker-option input:checked ~ .interest-picker-label {
    color: var(--clr-primary);
    font-weight: 600;
}

.interest-picker-label {
    font-size: 13.5px;
    color: var(--text-secondary);
    font-weight: 500;
}

.interest-picker-empty {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    padding: 16px;
    margin: 0;
    background: #ffffff;
}

.interest-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition-fast);
}

.interest-option:hover {
    color: var(--clr-primary);
}

.interest-option input {
    width: 15px;
    height: 15px;
    accent-color: var(--clr-primary);
    cursor: pointer;
}

.modal-submit {
    width: 100%;
    padding: 14px;
    margin-top: 12px;
    font-size: 14px;
    border-radius: 100px;
    justify-content: center;
}

/* --- Footer --- */
footer {
    padding: 40px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    text-align: center;
    color: var(--text-muted);
    font-size: 13.5px;
    background: #ffffff;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .section-title h2 {
        font-size: 30px;
    }
    .filters-wrapper {
        padding: 16px;
        border-radius: 16px;
    }
    .filter-label {
        margin-bottom: 6px;
        display: block;
    }
    .search-box-container {
        padding: 8px 8px 8px 16px;
        border-radius: 100px;
    }
    .modal-content {
        padding: 24px;
        border-radius: 20px;
    }
}
@media (max-width: 576px) {
    header .container {
        flex-direction: column;
        gap: 16px;
    }
    .logo {
        font-size: 21px;
    }
    .btn-primary:not(.btn-header-auth) {
        width: 100%;
        justify-content: center;
    }
    .search-box-container {
        flex-direction: row;
        padding: 6px 6px 6px 14px;
        border-radius: 100px;
        gap: 8px;
        align-items: center;
    }
    .search-input {
        width: auto;
        flex: 1;
        text-align: left;
        font-size: 13px;
    }
    .search-btn {
        width: auto;
        padding: 8px 14px;
        font-size: 12.5px;
    }
    .interest-checkboxes {
        grid-template-columns: 1fr;
    }
}

/* --- Authentication & Multi-Step Modals --- */

/* Utility Hidden Class */
.hidden {
    display: none !important;
}

/* User Widget in Header */
.user-profile-widget {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 6px 14px;
    border-radius: 100px;
    box-shadow: var(--shadow-sm);
}

.user-widget-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--clr-primary);
}

.user-widget-details {
    display: flex;
    flex-direction: column;
}

.user-widget-name {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.user-widget-status {
    font-size: 9.5px;
    color: var(--clr-success);
    display: flex;
    align-items: center;
    gap: 3px;
    font-weight: 600;
}

.user-widget-status i {
    font-size: 5px;
    animation: pulseGlow 1.5s infinite alternate;
}

@keyframes pulseGlow {
    0% { opacity: 0.4; }
    100% { opacity: 1; }
}

.btn-logout {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 15px;
    cursor: pointer;
    margin-left: 6px;
    padding: 3px;
    transition: var(--transition-fast);
}

.btn-logout:hover {
    color: var(--clr-accent);
    transform: scale(1.05);
}

/* Auth Switch Link */
.auth-switch-text {
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 18px;
}

.auth-switch-text a {
    color: var(--clr-primary);
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition-fast);
}

.auth-switch-text a:hover {
    text-decoration: underline;
}

/* Step Indicators inside Register Modal */
.step-indicator-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    position: relative;
    max-width: 220px;
    margin-left: auto;
    margin-right: auto;
}

.step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f8fafc;
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    z-index: 2;
    transition: var(--transition-slow);
}

.step-dot.active {
    background: var(--clr-primary);
    color: var(--clr-white);
    border-color: var(--clr-primary);
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.25);
}

.step-line {
    flex-grow: 1;
    height: 2px;
    background: rgba(0, 0, 0, 0.05);
    z-index: 1;
    margin: 0 -3px;
    transition: var(--transition-slow);
}

.step-line.active {
    background: var(--clr-primary);
}

/* Multi-Step Panels transition effects */
.step-panel {
    display: none;
    opacity: 0;
    transform: translateX(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.step-panel.active-panel {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

/* Avatar Upload Zone */
.avatar-upload-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 4px;
}

.avatar-preview-wrapper {
    position: relative;
    width: 108px;
    height: 108px;
    flex-shrink: 0;
}

.avatar-preview-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    border: 2px dashed rgba(79, 70, 229, 0.35);
    background: #f1f5f9;
    transition: var(--transition-slow);
    cursor: pointer;
}

.avatar-preview-wrapper:hover .avatar-preview-inner {
    border-color: var(--clr-primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.08);
}

.avatar-preview-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #eef2ff 0%, #e2e8f0 100%);
    color: #64748b;
    font-size: 36px;
}

.avatar-preview-placeholder.is-hidden,
#avatar-preview-img.is-hidden {
    display: none;
}

#avatar-preview-img:not(.is-hidden) {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-upload-label {
    position: absolute;
    z-index: 5;
    bottom: 0;
    right: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--clr-primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
    transition: var(--transition-fast);
    border: 3px solid #ffffff;
    font-size: 14px;
    line-height: 1;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
}

.avatar-upload-label i {
    pointer-events: none;
}

.avatar-upload-label:hover {
    transform: scale(1.06);
    background: var(--clr-secondary);
}

.upload-hint {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    text-align: center;
    max-width: 220px;
    line-height: 1.4;
}

.hidden-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    opacity: 0;
}

/* Form Elements Layout */
.form-row {
    display: flex;
    gap: 12px;
}

.flex-1 {
    flex: 1;
}

.modal-footer-btns {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

.register-step-actions {
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.btn-step-next {
    width: 100%;
    padding: 14px 28px;
    justify-content: center;
    font-size: 14.5px;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.2);
}

.btn-step-next i {
    font-size: 12px;
    transition: transform 0.25s ease;
}

.btn-step-next:hover i {
    transform: translateX(4px);
}

.modal-footer-btns button {
    padding: 10px 20px;
    border-radius: 100px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition-fast);
}

body.modal-open .fb-mobile-nav {
    display: none !important;
}

@media (max-width: 768px) {
    #register-modal .modal-content {
        max-height: calc(100dvh - 24px);
        padding: 20px 20px max(20px, env(safe-area-inset-bottom));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    #register-modal .form-row {
        flex-direction: column;
        gap: 0;
    }

    #register-modal .modal-footer-btns,
    #register-modal .register-step-actions {
        position: sticky;
        bottom: 0;
        z-index: 2;
        flex-shrink: 0;
        background: linear-gradient(to top, #ffffff 88%, rgba(255, 255, 255, 0));
        padding-top: 16px;
        padding-bottom: max(8px, env(safe-area-inset-bottom));
        margin-top: 16px;
    }

    #register-modal .modal-footer-btns {
        flex-direction: row;
        gap: 10px;
        justify-content: stretch;
    }

    #register-modal .modal-footer-btns .btn-primary,
    #register-modal .modal-footer-btns .btn-secondary {
        width: auto;
        flex: 1;
        min-height: 44px;
        justify-content: center;
    }
}

/* Department pill container adjustment */
.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
}

.btn-header-auth {
    min-height: 36px;
}

@media (max-width: 380px) {
    .logo-wordmark {
        max-width: 72px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #header-auth-actions .btn-header-auth {
        padding: 6px 9px;
        font-size: 11px;
    }
}


/* --- Search Status Bar --- */
.search-status-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 24px;
    font-size: 13.5px;
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
}

.search-status-title {
    font-weight: 700;
    color: var(--text-primary);
}

.status-badge {
    background: #eff6ff;
    color: #1d4ed8;
    padding: 3px 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #dbeafe;
}

.status-badge i {
    font-size: 10px;
    color: var(--clr-primary);
}

.clear-search-btn {
    background: none;
    border: none;
    color: var(--clr-accent);
    font-weight: 600;
    cursor: pointer;
    margin-left: auto;
    font-size: 12.5px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition-fast);
}

.clear-search-btn:hover {
    opacity: 0.8;
}

/* Card Action Buttons */
.card-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.btn-action-view, .btn-action-msg {
    flex: 1;
    padding: 10px 0;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition-fast);
}

.btn-action-view {
    background: #ffffff;
    color: var(--text-primary);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.btn-action-view:hover {
    color: var(--clr-primary);
    border-color: var(--clr-primary);
    background: #f5f3ff;
}

.btn-action-msg {
    background: rgba(79, 70, 229, 0.08);
    color: var(--clr-primary);
    border: 1.5px solid rgba(79, 70, 229, 0.2);
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.08);
}

.btn-action-msg:hover {
    background: rgba(79, 70, 229, 0.12);
    border-color: rgba(79, 70, 229, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.12);
}

.btn-action-msg.disabled {
    background: rgba(148, 163, 184, 0.06);
    color: var(--text-muted);
    border-color: rgba(148, 163, 184, 0.15);
    box-shadow: none;
    cursor: not-allowed;
}
.btn-action-msg.disabled:hover {
    transform: none;
    background: rgba(148, 163, 184, 0.06);
}

/* Professional Add Friend Button */
.btn-action-friend {
    flex: 1;
    padding: 10px 0;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition-fast);
    border: 1.5px solid transparent;
}

/* Add Friend state (light blue outline) */
.btn-action-friend.add {
    background: rgba(79, 70, 229, 0.08);
    color: var(--clr-primary);
    border-color: rgba(79, 70, 229, 0.2);
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.08);
}

.btn-action-friend.add:hover {
    background: rgba(79, 70, 229, 0.12);
    border-color: rgba(79, 70, 229, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.12);
}

/* Friends state (light green outline) */
.btn-action-friend.friend {
    background: rgba(16, 185, 129, 0.08);
    color: var(--clr-success);
    border-color: rgba(16, 185, 129, 0.2);
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.08);
}

.btn-action-friend.friend:hover {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.12);
}

/* Request Sent state (light gray outline) */
.btn-action-friend.pending {
    background: rgba(148, 163, 184, 0.06);
    color: var(--text-muted);
    border-color: rgba(148, 163, 184, 0.15);
    box-shadow: none;
    cursor: not-allowed;
}

.btn-action-friend.pending:hover {
    transform: none;
    background: rgba(148, 163, 184, 0.06);
}

/* Accept Request state (light accent outline) */
.btn-action-friend.accept {
    background: rgba(244, 63, 94, 0.08);
    color: var(--clr-accent);
    border-color: rgba(244, 63, 94, 0.2);
    box-shadow: 0 2px 6px rgba(244, 63, 94, 0.08);
}

.btn-action-friend.accept:hover {
    background: rgba(244, 63, 94, 0.12);
    border-color: rgba(244, 63, 94, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.12);
}

/* Profile View Modal */
.profile-modal-content {
    padding: 0;
    overflow: hidden;
}

.profile-modal-header {
    background: #f8fafc;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.profile-modal-avatar-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
}

.profile-modal-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ffffff;
    box-shadow: var(--shadow-sm);
}

.profile-modal-info h3 {
    font-size: 22px;
    margin-bottom: 4px;
}

.profile-modal-dept {
    font-size: 11px;
    background: #e0e7ff;
    color: var(--clr-primary);
    padding: 3px 10px;
    border-radius: 6px;
    font-weight: 700;
}

.profile-modal-body {
    padding: 30px;
}

.profile-meta-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px dashed rgba(0,0,0,0.06);
}

.profile-meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.meta-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.profile-bio-section h4, .profile-interests-section h4 {
    font-family: var(--font-header);
    font-size: 14px;
    margin-bottom: 10px;
}

.profile-bio-section p {
    font-size: 13.5px;
    line-height: 1.6;
    margin-bottom: 24px;
}

/* Chat Drawer Widget */
.chat-drawer {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 350px;
    height: 480px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    border: 1px solid rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    z-index: 1050;
    transform: translateY(120%) scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-slow);
}

.chat-drawer.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.chat-header {
    padding: 16px 20px;
    background: var(--clr-primary);
    color: #ffffff;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
    min-width: 0;
    flex: 1;
    transition: opacity 0.2s ease;
}

.chat-user-info:hover {
    opacity: 0.85;
}

.chat-user-info:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
    border-radius: 8px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    flex-shrink: 0;
}

.chat-user-text {
    min-width: 0;
}

.chat-user-text h5 {
    font-family: var(--font-header);
    font-size: 15px;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-close-chat {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.7;
    transition: var(--transition-fast);
}

.btn-close-chat:hover {
    opacity: 1;
    transform: scale(1.1);
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
}

.chat-empty-state {
    margin: auto;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

.message-bubble {
    max-width: 100%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 13px;
    line-height: 1.4;
}

.message-item {
    display: flex;
    flex-direction: column;
    max-width: 80%;
    margin-bottom: 12px;
}

.message-item.incoming {
    align-self: flex-start;
}

.message-item.outgoing {
    align-self: flex-end;
}

.message-meta {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

.message-read-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
}

.message-read-status.seen {
    color: var(--clr-primary);
}

.message-bubble.incoming {
    align-self: flex-start;
    background: #ffffff;
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.message-bubble.outgoing {
    align-self: flex-end;
    background: var(--clr-primary);
    color: #ffffff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.15);
}

.chat-input-area {
    padding: 16px;
    background: #ffffff;
    border-top: 1px solid rgba(0,0,0,0.05);
    border-radius: 0 0 20px 20px;
    display: flex;
    gap: 10px;
}

#chat-input {
    flex: 1;
    background: #f1f5f9;
    border: none;
    border-radius: 100px;
    padding: 10px 16px;
    font-family: var(--font-body);
    font-size: 13.5px;
    outline: none;
}

#chat-input:focus {
    background: #e2e8f0;
}

#btn-send-message {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--clr-primary);
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

#btn-send-message:hover {
    background: #3730a3;
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .chat-drawer {
        bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 576px) {
    .chat-drawer {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }
    .chat-header, .chat-input-area {
        border-radius: 0;
    }
}

/* Inbox Sidebar Widget */
.inbox-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 360px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -5px 0 30px rgba(0,0,0,0.08);
    z-index: 1040;
    transform: translateX(100%);
    opacity: 0;
    transition: var(--transition-slow);
    display: flex;
    flex-direction: column;
}

.inbox-sidebar.active {
    transform: translateX(0);
    opacity: 1;
}

.inbox-header {
    padding: 24px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.inbox-header h3 {
    font-family: var(--font-header);
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.inbox-header h3 i {
    color: var(--clr-primary);
}

.btn-close-inbox {
    background: #f8fafc;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.btn-close-inbox:hover {
    background: var(--clr-accent);
    color: #ffffff;
}

.inbox-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.inbox-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition-fast);
    border: 1px solid transparent;
    position: relative;
}

.inbox-item-unread {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--clr-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.inbox-item:hover {
    background: #f8fafc;
    border-color: rgba(0,0,0,0.04);
}

.inbox-item-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(0,0,0,0.05);
}

.inbox-item-content {
    flex: 1;
    overflow: hidden;
}

.inbox-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.inbox-item-name {
    font-family: var(--font-header);
    font-weight: 700;
    font-size: 14px;
    color: var(--text-primary);
}

.inbox-item-time {
    font-size: 11px;
    color: var(--text-muted);
}

.inbox-item-text {
    font-size: 12.5px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-inbox {
    background: #f8fafc;
    border: 1px solid rgba(0,0,0,0.05);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-inbox:hover {
    background: var(--clr-primary);
    color: #ffffff;
    border-color: var(--clr-primary);
}

.user-widget-profile {
    transition: var(--transition-fast);
}

.user-widget-profile:hover {
    opacity: 0.8;
}

/* Facebook-style Profile Page */
.fb-profile {
    padding-bottom: 48px;
    overflow: visible;
}

.fb-profile-hero {
    position: relative;
    overflow: visible;
    background: var(--bg-surface);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.fb-profile-cover {
    position: relative;
    z-index: 1;
    height: 320px;
    background: #dfe3ea;
    overflow: hidden;
}

.fb-profile-cover--default {
    background:
        linear-gradient(135deg, rgba(79, 70, 229, 0.85), rgba(14, 165, 233, 0.75)),
        url('https://images.unsplash.com/photo-1523050854058-8df90110c9f1?auto=format&fit=crop&q=80&w=1600&h=500') center / cover;
}

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

.fb-cover-edit-btn {
    position: absolute;
    z-index: 2;
    right: 20px;
    bottom: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.fb-cover-edit-btn:hover {
    background: #ffffff;
}

.fb-profile-hero-inner {
    position: relative;
    z-index: 2;
    overflow: visible;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.fb-profile-identity {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    min-height: 96px;
    margin-left: 196px;
    padding-bottom: 16px;
}

.fb-profile-avatar-shell {
    position: absolute;
    top: -84px;
    left: 24px;
    z-index: 10;
    width: 168px;
    height: 168px;
    border-radius: 50%;
    border: 5px solid #ffffff;
    overflow: hidden;
    background: #ffffff;
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
}

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

.fb-profile-title-block {
    flex: 1;
    min-width: 0;
    padding-bottom: 2px;
}

.fb-profile-title-block h1 {
    font-size: 28px;
    line-height: 1.15;
    margin-bottom: 4px;
    font-family: var(--font-header);
}

.fb-profile-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.fb-profile-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
    padding-bottom: 4px;
    width: 100%;
    max-width: 360px;
}

.fb-profile-action-bar {
    display: flex;
    align-items: stretch;
    gap: 8px;
    width: 100%;
}

.fb-profile-action-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    border: none;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}

.fb-profile-action-btn i {
    font-size: 14px;
}

.fb-profile-action-btn--primary {
    background: var(--clr-primary);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

.fb-profile-action-btn--primary:hover {
    background: #4338ca;
}

.fb-profile-action-btn--secondary {
    background: #e4e6eb;
    color: #050505;
}

.fb-profile-action-btn--secondary:hover {
    background: #d8dadf;
}

#btn-profile-logout.fb-profile-action-btn--secondary:hover {
    background: #fde8e8;
    color: #b91c1c;
}

.fb-profile-action-btn:active {
    transform: scale(0.98);
}

.fb-profile-tabs {
    display: flex;
    gap: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding-top: 4px;
    margin-top: 0;
}

.fb-profile-tab {
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    padding: 14px 18px;
    transition: var(--transition-fast);
}

.fb-profile-tab:hover,
.fb-profile-tab.active {
    color: var(--clr-primary);
}

.fb-profile-tab.active {
    border-bottom-color: var(--clr-primary);
}

.fb-profile-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 680px);
    gap: 20px;
    align-items: start;
    justify-content: center;
    max-width: 1100px;
}

.fb-profile-main {
    min-width: 0;
    width: 100%;
}

.fb-profile-card {
    background: var(--bg-surface);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    padding: 16px;
}

.fb-profile-card h2,
.fb-profile-card h3 {
    font-family: var(--font-header);
    font-size: 17px;
    margin-bottom: 12px;
}

.fb-intro-bio,
.fb-about-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.fb-intro-list {
    list-style: none;
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.fb-intro-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-primary);
}

.fb-intro-list i {
    width: 18px;
    color: var(--text-muted);
}

.fb-intro-interests,
.fb-about-interests {
    margin-top: 16px;
}

.fb-intro-edit-btn {
    width: 100%;
    margin-top: 8px;
}

@media (min-width: 769px) {
    .fb-profile-hero-actions {
        width: auto;
        max-width: none;
    }

    .fb-profile-action-bar {
        width: auto;
    }

    .fb-profile-action-btn {
        flex: 0 1 auto;
        min-width: 130px;
    }
}

.fb-profile-panel {
    display: none;
}

.fb-profile-panel.active {
    display: block;
}

.fb-composer-card {
    margin-bottom: 16px;
    padding: 12px 16px 16px;
}

.fb-composer-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fb-composer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.fb-composer-trigger {
    flex: 1;
    text-align: left;
    border: none;
    background: #f0f2f5;
    color: var(--text-secondary);
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.fb-composer-trigger:hover {
    background: #e4e6eb;
}

.fb-composer-form textarea {
    width: 100%;
    margin-top: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 12px 14px;
    font-family: var(--font-body);
    font-size: 15px;
    resize: vertical;
    min-height: 110px;
}

.fb-composer-form textarea:focus {
    outline: none;
    border-color: rgba(79, 70, 229, 0.35);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
}

.fb-composer-preview {
    position: relative;
    margin-top: 12px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.fb-composer-preview img {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    display: block;
}

.fb-composer-preview-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.72);
    color: #ffffff;
    cursor: pointer;
}

.fb-composer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.fb-composer-media-btn,
.fb-composer-quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--clr-success);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
}

.fb-composer-media-btn:hover,
.fb-composer-quick-btn:hover {
    background: #f0fdf4;
}

.fb-composer-submit-group {
    display: flex;
    gap: 8px;
}

.fb-composer-quick-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.fb-posts-feed {
    display: grid;
    gap: 16px;
}

.fb-post-card {
    background: var(--bg-surface);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.fb-post-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
}

.fb-post-meta {
    flex: 1;
    min-width: 0;
}

.fb-post-menu {
    position: relative;
    margin-left: auto;
    flex-shrink: 0;
}

.fb-post-menu-trigger {
    border: none;
    background: transparent;
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.fb-post-menu-trigger:hover,
.fb-post-menu-trigger.is-open {
    background: #f0f2f5;
    color: var(--text-primary);
}

.fb-post-menu-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 160px;
    background: var(--bg-surface);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    padding: 6px;
    z-index: 20;
}

.fb-post-menu-item {
    width: 100%;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}

.fb-post-menu-item:hover {
    background: #f0f2f5;
}

.fb-post-menu-item--danger {
    color: var(--clr-accent);
}

.fb-post-menu-item--danger:hover {
    background: rgba(244, 63, 94, 0.08);
}

.fb-post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.fb-post-meta h3 {
    font-size: 15px;
    margin-bottom: 2px;
}

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

.fb-post-body {
    padding: 0 16px 12px;
}

.fb-post-body p {
    font-size: 15px;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

.fb-post-media {
    padding: 0 12px 12px;
}

.fb-post-media img {
    width: 100%;
    max-width: 100%;
    display: block;
    max-height: 420px;
    object-fit: contain;
    border-radius: 8px;
    background: #f1f5f9;
}

.fb-post-footer {
    display: flex;
    gap: 4px;
    padding: 8px 12px 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    margin-top: 8px;
}

.fb-post-action {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
}

.fb-post-action:not(:disabled):hover {
    background: #f0f2f5;
}

.fb-post-action:disabled {
    opacity: 0.72;
    cursor: default;
}

.fb-post-action i {
    margin-right: 6px;
}

.fb-post-action.is-active,
.fb-post-love-btn.is-active {
    color: var(--clr-accent);
}

.fb-post-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.fb-post-stat-likes {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.fb-post-stat-likes i {
    color: var(--clr-accent);
    font-size: 12px;
}

.fb-post-stat-comments {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    padding: 0;
}

.fb-post-stat-comments:hover {
    text-decoration: underline;
}

.fb-post-comments {
    padding: 12px 16px 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: #f8fafc;
}

.fb-post-comment-form {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.fb-post-comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.fb-post-comment-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-surface);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    padding: 6px 6px 6px 14px;
}

.fb-post-comment-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    outline: none;
    min-width: 0;
}

.fb-post-comment-submit {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: var(--clr-primary);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fb-post-comment-submit:disabled {
    opacity: 0.6;
    cursor: default;
}

.fb-post-comment-list {
    display: grid;
    gap: 10px;
}

.fb-post-comment-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.fb-post-comment-item img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.fb-post-comment-bubble {
    background: var(--bg-surface);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 8px 12px;
    flex: 1;
}

.fb-post-comment-bubble h4 {
    font-size: 13px;
    margin-bottom: 2px;
}

.fb-post-comment-bubble p {
    font-size: 14px;
    line-height: 1.45;
    white-space: pre-wrap;
}

.fb-post-comment-bubble time {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: var(--text-muted);
}

.fb-post-comment-empty {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    padding: 8px 0;
}

.fb-empty-feed {
    text-align: center;
    padding: 40px 24px;
    color: var(--text-secondary);
}

.fb-empty-feed i {
    font-size: 42px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.fb-about-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

@media (max-width: 992px) {
    .fb-profile-layout {
        grid-template-columns: 1fr;
        gap: 16px;
        max-width: 680px;
    }

    .fb-profile-identity {
        margin-left: 148px;
        min-height: 88px;
    }

    .fb-profile-title-block h1 {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .fb-profile {
        padding-bottom: 32px;
    }

    .fb-profile-cover {
        height: 180px;
    }

    .fb-profile-hero-inner {
        padding: 0 16px 8px;
    }

    .fb-profile-avatar-shell {
        position: relative;
        top: -48px;
        left: auto;
        margin: 0 auto -36px;
        width: 128px;
        height: 128px;
        border-width: 4px;
    }

    .fb-profile-identity {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-left: 0;
        min-height: auto;
        padding-left: 0;
        padding-bottom: 8px;
        gap: 12px;
    }

    .fb-profile-title-block {
        width: 100%;
        padding-bottom: 0;
    }

    .fb-profile-title-block h1 {
        font-size: 22px;
    }

    .fb-profile-subtitle {
        font-size: 13px;
    }

    .fb-profile-hero-actions {
        justify-content: center;
        max-width: 100%;
        padding: 0 4px 4px;
    }

    .fb-profile-action-bar {
        max-width: 340px;
        margin: 0 auto;
    }

    .fb-profile-action-btn {
        min-height: 44px;
        font-size: 15px;
    }

    .fb-intro-edit-btn {
        display: none;
    }

    .fb-profile-tabs {
        justify-content: center;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 0;
        margin: 0 -16px;
        padding: 0 16px;
    }

    .fb-profile-tabs::-webkit-scrollbar {
        display: none;
    }

    .fb-profile-tab {
        flex-shrink: 0;
        padding: 12px 20px;
        font-size: 14px;
    }

    .fb-profile-layout.container {
        padding: 0 12px;
    }

    .fb-profile-sidebar {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .fb-profile-card {
        padding: 14px;
        border-radius: 10px;
    }

    .fb-composer-header {
        gap: 10px;
    }

    .fb-composer-trigger {
        font-size: 14px;
    }

    .fb-composer-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .fb-composer-submit-group {
        width: 100%;
        justify-content: stretch;
    }

    .fb-composer-submit-group .btn-secondary,
    .fb-composer-submit-group .btn-primary {
        flex: 1;
    }

    .fb-about-grid {
        grid-template-columns: 1fr;
    }

    .fb-cover-edit-btn {
        right: 12px;
        bottom: 12px;
        font-size: 12px;
        padding: 7px 12px;
    }
}

@media (max-width: 640px) {
    .fb-profile-cover {
        height: 160px;
    }

    .fb-profile-avatar-shell {
        width: 112px;
        height: 112px;
        top: -40px;
        margin-bottom: -28px;
    }

    .fb-profile-title-block h1 {
        font-size: 20px;
    }

    .fb-profile-action-bar {
        max-width: 100%;
        padding: 0 8px;
    }
}

/* Facebook-style Edit Profile Modal */
.fb-edit-profile-modal {
    z-index: 2000;
    align-items: center;
    padding: 24px;
}

.fb-edit-profile-content {
    max-width: 640px;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.18);
}

.fb-edit-profile-header {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid #e4e6eb;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 2;
}

.fb-edit-profile-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    color: var(--text-primary);
}

.fb-edit-profile-close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #e4e6eb;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.fb-edit-profile-close:hover {
    background: #d8dadf;
}

.fb-edit-profile-save {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: var(--clr-primary);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    padding: 9px 16px;
    border-radius: 8px;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
    transition: background 0.15s, opacity 0.15s;
}

.fb-edit-profile-save i {
    color: #ffffff;
}

.fb-edit-profile-save:hover {
    background: #4338ca;
}

.fb-edit-profile-save:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.fb-edit-profile-body {
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    background: #f0f2f5;
}

.fb-edit-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 28px 20px 20px;
    background: #fff;
    border-bottom: 1px solid #e4e6eb;
}

.fb-edit-hero-avatar-wrap {
    position: relative;
    width: 120px;
    height: 120px;
}

.fb-edit-hero-avatar,
#edit-profile-avatar-preview {
    width: 120px;
    height: 120px;
    max-width: 120px;
    max-height: 120px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 4px solid #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    background: #e4e6eb;
}

.fb-edit-hero-camera {
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e4e6eb;
    border: 3px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    transition: background 0.15s;
}

.fb-edit-hero-camera:hover {
    background: #d8dadf;
}

.fb-edit-hero-link {
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.fb-edit-hero-link:hover {
    text-decoration: underline;
}

.fb-edit-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

.fb-edit-card {
    background: #fff;
    border-radius: 10px;
    padding: 18px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.fb-edit-card-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f0f2f5;
}

.fb-edit-card-head i {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #eef2ff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 15px;
}

.fb-edit-card-head h3 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.fb-edit-card-head p {
    margin: 0;
    font-size: 13px;
    color: #65676b;
    line-height: 1.4;
}

.fb-edit-field {
    margin-top: 14px;
}

.fb-edit-field:first-of-type {
    margin-top: 0;
}

.fb-edit-field-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.fb-edit-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #65676b;
}

.fb-edit-input,
.fb-edit-textarea {
    width: 100%;
    border: 1px solid #dddfe2;
    border-radius: 8px;
    padding: 11px 12px;
    font-size: 15px;
    color: var(--text-primary);
    background: #f8fafc;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.fb-edit-input:focus,
.fb-edit-textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.fb-edit-textarea {
    resize: vertical;
    min-height: 96px;
}

.fb-edit-char-count {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #8a8d91;
    text-align: right;
}

.fb-edit-interest-picker {
    margin-top: 4px;
}

body.profile-edit-open {
    overflow: hidden;
}

/* Profile logout — action bar uses .fb-profile-action-btn */

.fb-account-card h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
}

.fb-account-card h2 i {
    color: var(--text-secondary);
    font-size: 16px;
}

.fb-account-email {
    margin: 0 0 4px;
    font-size: 14px;
    color: var(--text-secondary);
    word-break: break-all;
}

@media (max-width: 768px) {
    .fb-edit-profile-modal {
        padding: 0;
        align-items: flex-end;
    }

    .fb-edit-profile-content {
        max-width: none;
        max-height: 92vh;
        border-radius: 16px 16px 0 0;
    }

    .fb-edit-profile-header {
        grid-template-columns: 40px 1fr auto;
        padding: 12px 14px;
        gap: 8px;
    }

    .fb-edit-profile-header h2 {
        font-size: 17px;
    }

    .fb-edit-profile-save {
        padding: 8px 12px;
        font-size: 13px;
    }

    .fb-edit-profile-body {
        max-height: calc(92vh - 60px);
    }

    .fb-edit-field-grid {
        grid-template-columns: 1fr;
    }

    .fb-edit-hero-avatar-wrap,
    .fb-edit-hero-avatar,
    #edit-profile-avatar-preview {
        width: 100px;
        height: 100px;
        max-width: 100px;
        max-height: 100px;
    }
}

/* Toast notifications */
.notyf__toast {
    font-family: var(--font-body);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    max-width: 360px;
}

.notyf__message {
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.4;
}

.btn-google-sign-in {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

/* --- Profile onboarding (complete-profile page) --- */
html.onboard-active,
body.onboard-active {
    min-height: 0;
    height: auto;
}

body.onboard-active {
    padding-bottom: 24px;
}

body.onboard-active .fb-header,
body.onboard-active .fb-mobile-nav,
body.onboard-active .chat-drawer,
body.onboard-active .inbox-sidebar {
    display: none !important;
}

.onboard-page {
    padding: 32px 16px 0;
    margin: 0 auto;
}

.onboard-wrap {
    width: min(640px, 100%);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.onboard-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.onboard-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--clr-primary);
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(14, 165, 233, 0.1));
    border: 1px solid rgba(79, 70, 229, 0.14);
}

.onboard-hero h1 {
    margin: 0;
    font-family: var(--font-header);
    font-size: clamp(1.5rem, 4vw, 1.9rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.onboard-hero > p {
    margin: 0;
    max-width: 34rem;
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.onboard-photo-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
}

.onboard-photo-ring {
    position: relative;
    width: 76px;
    height: 76px;
    flex-shrink: 0;
}

.onboard-photo {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.18);
}

.onboard-photo-btn {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--clr-primary);
    color: #fff;
    border: 2px solid #fff;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.onboard-photo-btn:hover {
    transform: scale(1.05);
    background: #4338ca;
}

.onboard-photo-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.onboard-photo-meta strong {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.onboard-photo-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--clr-primary);
    cursor: pointer;
    width: fit-content;
}

.onboard-photo-link:hover {
    text-decoration: underline;
}

.onboard-form-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 22px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.onboard-form {
    padding: 20px 20px 18px;
    display: grid;
    gap: 14px;
}

.onboard-form-head h2 {
    margin: 0 0 4px;
    font-family: var(--font-header);
    font-size: 1.15rem;
    color: var(--text-primary);
}

.onboard-form-head p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.onboard-field {
    display: grid;
    gap: 6px;
}

.onboard-field .form-label {
    margin-bottom: 0;
}

.onboard-field-hint {
    margin: -2px 0 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.onboard-bio {
    min-height: 80px;
    resize: vertical;
}

.onboard-char-count {
    justify-self: end;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.onboard-field-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.onboard-field-interests {
    gap: 8px;
    min-height: 0;
}

.onboard-interests {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.onboard-interests-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: #f8fafc;
}

.onboard-interests-search i {
    color: var(--text-muted);
    font-size: 13px;
}

.onboard-interests-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    font-family: var(--font-body);
    background: transparent;
    color: var(--text-primary);
}

.onboard-interests-input::placeholder {
    color: var(--text-muted);
}

.onboard-interests-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    min-height: 38px;
    padding: 10px 14px;
    max-height: 72px;
    overflow-y: auto;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    background: #fff;
}

.onboard-interests-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(79, 70, 229, 0.18);
    background: #f5f3ff;
    color: var(--clr-primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.onboard-interests-tag i {
    font-size: 10px;
    opacity: 0.8;
}

.onboard-interests-empty-hint {
    margin: 0;
    font-size: 12.5px;
    color: var(--text-muted);
}

.onboard-interests-list {
    display: block;
    height: 220px;
    max-height: 220px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 6px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background: #fafbfc;
}

.onboard-interests-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: var(--transition-fast);
}

.onboard-interests-option:hover {
    background: rgba(79, 70, 229, 0.06);
}

.onboard-interests-option.is-selected {
    color: var(--clr-primary);
    font-weight: 600;
    background: rgba(79, 70, 229, 0.08);
}

.onboard-interests-check {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0, 0, 0, 0.15);
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.onboard-interests-check i {
    font-size: 10px;
    color: #fff;
    opacity: 0;
    transform: scale(0.5);
    transition: var(--transition-fast);
}

.onboard-interests-option.is-selected .onboard-interests-check {
    background: var(--clr-primary);
    border-color: var(--clr-primary);
}

.onboard-interests-option.is-selected .onboard-interests-check i {
    opacity: 1;
    transform: scale(1);
}

.onboard-interests-label {
    line-height: 1.35;
}

.onboard-interests-no-match {
    margin: 0;
    padding: 14px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    background: #fff;
}

.onboard-submit {
    width: 100%;
    margin-top: 2px;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.95rem;
    border-radius: 14px;
}

@media (max-width: 640px) {
    .onboard-page {
        padding: 16px 12px 0;
    }

    .onboard-form {
        padding: 16px 14px 14px;
    }

    .onboard-field-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile install app banner */
.install-app-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1100;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

body.install-banner-active {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

.install-app-banner-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 640px;
    margin: 0 auto;
}

.install-app-banner-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    flex-shrink: 0;
    object-fit: cover;
}

.install-app-banner-copy {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.install-app-banner-copy strong {
    font-family: var(--font-header);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.install-app-banner-copy span {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.3;
}

.install-app-banner-btn {
    flex-shrink: 0;
    border: none;
    border-radius: 100px;
    padding: 8px 14px;
    background: var(--clr-primary);
    color: #fff;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
}

.install-app-banner-btn:hover {
    filter: brightness(1.05);
}

.install-app-banner-close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: #f0f2f5;
    color: #65676b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.install-app-banner-close:hover {
    background: #e4e6eb;
}

.install-app-hint-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 16px;
}

.install-app-hint {
    width: min(100%, 420px);
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.install-app-hint h3 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.install-app-hint p {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-muted);
}

.install-app-hint p i {
    margin: 0 4px;
    color: var(--clr-primary);
}

.install-app-hint-btn {
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    background: var(--clr-primary);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
