/*
Theme Name: WorkSpace
Theme URI: 
Author: WorkSpace
Author URI: 
Description: A company internal communication platform. Features a live news feed, groups, announcements, events, messaging, file sharing, and notifications.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: workspace
Tags: social, intranet, internal, communication, company
*/

/* ============================================
   CSS VARIABLES & DESIGN TOKENS
   ============================================ */
:root {
    /* Brand Colors */
    --primary: #1877F2;
    --primary-dark: #0d65d9;
    --primary-light: #e7f0fd;
    --accent: #42b883;
    --danger: #e74c3c;
    --warning: #f39c12;
    --success: #27ae60;

    /* Brand */
    --ws-blue: #003087;
    --ws-gold: #FFB800;

    /* Neutrals */
    /* --bg-body: #f0f2f5; */
    --bg-body: #f1f5ff;
    --bg-white: #ffffff;
    --bg-hover: #f2f2f2;
    --bg-input: #f0f2f5;
    --border: #dddfe2;
    --border-light: #e4e6eb;

    /* Text */
    --text-primary: #1c1e21;
    --text-secondary: #65676b;
    --text-muted: #8a8d91;
    --text-link: #1877F2;

    /* Sidebar */
    --sidebar-width: 280px;
    --sidebar-right-width: 280px;

    /* Header */
    --header-height: 56px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.1);
    --shadow-md: 0 2px 12px rgba(0,0,0,0.12);
    --shadow-card: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.12);

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Transitions */
    --transition: 0.15s ease;
    --transition-md: 0.25s ease;

    /* Typography */
    --font-body: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-size-xs: 11px;
    --font-size-sm: 13px;
    --font-size-base: 15px;
    --font-size-md: 16px;
    --font-size-lg: 20px;
    --font-size-xl: 24px;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --bg-body: #18191a;
    --bg-white: #242526;
    --bg-hover: #3a3b3c;
    --bg-input: #3a3b3c;
    --border: #3e4042;
    --border-light: #3e4042;
    --text-primary: #e4e6eb;
    --text-secondary: #b0b3b8;
    --text-muted: #8a8d91;
    --shadow-card: 0 1px 3px rgba(0,0,0,0.3);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    color: var(--text-primary);
    background-color: var(--bg-body);
    line-height: 1.5;
    min-height: 100vh;
}
a { color: var(--text-link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }
ul, ol { list-style: none; }

/* ============================================
   LAYOUT WRAPPER
   ============================================ */
.wp-site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-content-area {
    display: flex;
    padding-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

.main-content-wrapper {
    flex: 1;
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr var(--sidebar-right-width);
    gap: 0;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 0 8px;
    align-items: start;
}

/* ============================================
   HEADER / NAVIGATION BAR
   ============================================ */
#masthead {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    padding: 0 16px;
    /* display: grid;
    grid-template-columns: var(--sidebar-width) 1fr auto;
    align-items: center;
    gap: 8px; */
    display: flex;
    align-items: center;
    justify-content: center;
}
.masthead-wrapper{
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 0 8px;
    align-items: start;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
}
.header-logo img {
    height: 36px;
    width: auto;
}
.header-logo .site-name {
    font-size: var(--font-size-md);
    font-weight: 700;
    color: var(--ws-blue);
    white-space: nowrap;
}
.header-logo .site-tagline {
    font-size: 10px;
    color: var(--text-secondary);
    font-weight: 400;
    display: block;
    line-height: 1;
}

.header-search {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border-radius: var(--radius-full);
    padding: 8px 16px;
    gap: 8px;
    max-width: calc(680px - 16px);
    width: 100%;
    border: 1px solid transparent;
    transition: var(--transition);
}
.header-search:focus-within {
    background: var(--bg-white);
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light);
}
.header-search svg { color: var(--text-secondary); flex-shrink: 0; }
.header-search input {
    background: none;
    border: none;
    outline: none;
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    width: 100%;
}
.header-search input::placeholder { color: var(--text-secondary); }

.header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}
.header-icon-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: var(--transition);
    flex-shrink: 0;
}
.header-icon-btn:hover { background: var(--border); text-decoration: none; }
.header-icon-btn svg { width: 20px; height: 20px; }
.badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    border: 2px solid var(--bg-white);
}

.header-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    flex-shrink: 0;
}
.header-avatar:hover { border-color: var(--primary); }
.header-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Profile Dropdown */
.profile-dropdown {
    position: relative;
}
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    min-width: 220px;
    padding: 8px;
    display: none;
    z-index: 100;
}
.dropdown-menu.is-open { display: block; }
.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    transition: var(--transition);
    text-decoration: none;
}
.dropdown-menu a:hover { background: var(--bg-hover); text-decoration: none; }
.dropdown-menu .dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: 4px 0;
}

/* Dark mode toggle in dropdown */
.dark-mode-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: var(--transition);
}
.dark-mode-toggle:hover { background: var(--bg-hover); }
.toggle-switch {
    width: 36px;
    height: 20px;
    background: var(--border);
    border-radius: var(--radius-full);
    position: relative;
    transition: var(--transition);
}
.toggle-switch.active { background: var(--primary); }
.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: var(--radius-full);
    transition: var(--transition);
}
.toggle-switch.active::after { transform: translateX(16px); }

/* ============================================
   LEFT SIDEBAR
   ============================================ */
#secondary-left {
    width: var(--sidebar-width);
    padding: 8px 8px 8px 0;
    position: sticky;
    top: calc(var(--header-height) + 8px);
    max-height: calc(100vh - var(--header-height) - 16px);
    overflow-y: auto;
    scrollbar-width: none;
}
#secondary-left::-webkit-scrollbar { display: none; }

.sidebar-profile-card {
    display: block;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
}
.sidebar-profile-card:hover { text-decoration: none; }
.sidebar-profile-cover {
    height: 60px;
    background: linear-gradient(135deg, var(--ws-blue, #003087), var(--primary, #1877F2));
    background-size: cover;
    background-position: center;
}
.sidebar-profile-avatar {
    display: flex;
    justify-content: center;
    margin-top: -28px;
    position: relative;
    z-index: 1;
}
.sidebar-profile-avatar img {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 3px solid var(--bg-white);
}
.sidebar-profile-info {
    text-align: center;
    padding: 8px 16px 16px;
}
.sidebar-profile-card .profile-name {
    font-size: var(--font-size-sm);
    font-weight: 700;
}
.sidebar-profile-card .profile-email {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sidebar-profile-card .profile-department {
    font-size: 11px;
    color: var(--primary);
    font-weight: 600;
    margin-top: 4px;
}

.sidebar-nav-section {
    /* margin-bottom: 8px; */
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-card);
}
.sidebar-nav-section-title {
    font-size: var(--font-size-xs);
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    margin: 12px 0 4px;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
}
.sidebar-nav-item:hover { background: var(--bg-hover); text-decoration: none; }
.sidebar-nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
}
.sidebar-nav-item.active svg { color: var(--primary); }
.sidebar-nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--text-secondary);
}
.sidebar-nav-item .nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.sidebar-divider {
    height: 1px;
    background: var(--border-light);
    margin: 8px 0;
}

/* ============================================
   MAIN FEED AREA
   ============================================ */
#primary {
    padding: 8px 8px;
    max-width: 680px;
    width: 100%;
    margin: 0 auto;
}

/* ============================================
   POST COMPOSER
   ============================================ */
.post-composer {
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    padding: 16px;
    box-shadow: var(--shadow-card);
    margin-bottom: 16px;
}
.composer-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.composer-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
}
.composer-input {
    flex: 1;
    background: var(--bg-input);
    border: none;
    border-radius: var(--radius-full);
    padding: 10px 16px;
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    outline: none;
    font-family: inherit;
}
.composer-input:focus,
.composer-input:hover { background: var(--border-light); }
.composer-input::placeholder { color: var(--text-secondary); }

.composer-divider {
    height: 1px;
    background: var(--border-light);
    margin: 4px 0 8px;
}
.composer-actions {
    display: flex;
    gap: 4px;
    justify-content: space-between;
}
.composer-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    flex: 1;
    justify-content: center;
}
.composer-action-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.composer-action-btn svg { width: 18px; height: 18px; }

/* Expanded Composer Modal */
.composer-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.composer-modal.is-open { display: flex; }
.composer-modal-content {
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    width: 100%;
    max-width: 560px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    animation: slideUp 0.2s ease;
}
@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.composer-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
}
.composer-modal-header h3 {
    font-size: var(--font-size-md);
    font-weight: 700;
}
.modal-close-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    border: none;
}
.modal-close-btn:hover { background: var(--border); }
.composer-modal-body { padding: 16px 20px; }
.composer-modal-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.composer-modal-user img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
}
.composer-modal-user .user-name { font-weight: 600; font-size: var(--font-size-sm); }
.audience-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-input);
    border: none;
    border-radius: var(--radius-sm);
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}
.audience-btn:hover { background: var(--border); }
.post-textarea {
    width: 100%;
    border: none;
    outline: none;
    resize: none;
    font-size: 18px;
    color: var(--text-primary);
    background: transparent;
    font-family: inherit;
    min-height: 100px;
    line-height: 1.5;
}
.post-textarea::placeholder { color: var(--text-muted); }
.composer-media-preview {
    margin-top: 12px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}
/* Multi-photo preview grid */
.media-preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.media-preview-item {
    position: relative;
    width: 90px;
    height: 90px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-input);
    flex-shrink: 0;
}
.media-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.media-preview-thumb.video-thumb {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--text-secondary);
}
.media-preview-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    font-size: 10px;
    padding: 2px 4px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.remove-preview-item {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: rgba(0,0,0,0.6);
    border: none;
    border-radius: var(--radius-full);
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
/* Tag people popover */
.tag-people-popover {
    margin-top: 8px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}
#tag-search-input {
    width: 100%;
    border: none;
    border-bottom: 1px solid var(--border-light);
    padding: 10px 14px;
    font-size: var(--font-size-sm);
    outline: none;
    background: transparent;
    color: var(--text-primary);
    box-sizing: border-box;
}
.tag-search-results { max-height: 180px; overflow-y: auto; }
.tag-result-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: var(--font-size-sm);
}
.tag-result-row:hover, .tag-result-row:focus { background: var(--bg-hover); outline: none; }
.tag-result-row img {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
}
.tag-selected-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 14px;
    min-height: 0;
}
.tag-selected-chips:empty { padding: 0; }
.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--primary-light, #e7f3ff);
    color: var(--primary);
    border-radius: var(--radius-full);
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
}
.tag-chip-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    font-size: 14px;
    line-height: 1;
    padding: 0;
    opacity: 0.7;
}
.tag-chip-remove:hover { opacity: 1; }
.toolbar-icon-btn.is-active { color: var(--primary); background: var(--primary-light, #e7f3ff); }
/* Feeling popover */
.feeling-popover {
    margin-top: 8px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    box-shadow: var(--shadow-md);
    padding: 10px;
}
.feeling-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
}
.feeling-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border: none;
    background: none;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
}
.feeling-option:hover { background: var(--bg-hover); }
/* Persistent tagged-people indicator above toolbar */
.composer-tagged-indicator {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 16px;
    font-size: 13px;
    color: var(--text-secondary);
}
.tag-indicator-with {
    font-weight: 500;
    color: var(--text-muted);
}
.tag-ind-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px 2px 10px;
    background: var(--primary-light, #e7f3ff);
    color: var(--primary, #1877f2);
    border-radius: var(--radius-pill, 999px);
    font-size: 13px;
    font-weight: 600;
}
.tag-ind-remove {
    background: none;
    border: none;
    padding: 0 0 0 2px;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    color: var(--primary, #1877f2);
    opacity: .7;
}
.tag-ind-remove:hover { opacity: 1; }

/* Selected feeling chip above toolbar */
.composer-selected-feeling {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 6px 10px;
    background: var(--primary-light, #e7f3ff);
    border-radius: var(--radius-full);
    width: fit-content;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--primary);
}
.composer-selected-feeling button {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    opacity: 0.7;
}
.composer-selected-feeling button:hover { opacity: 1; }
/* Post feeling display */
.post-feeling {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-left: 4px;
}

/* ============================================
   FEELING / ACTIVITY MODAL (Facebook-style)
   ============================================ */
.feeling-activity-modal {
    margin-top: 8px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    max-height: 380px;
    display: flex;
    flex-direction: column;
}
.fa-modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-light);
}
.fa-modal-back {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}
.fa-modal-back:hover { background: var(--bg-hover); color: var(--text-primary); }
.fa-modal-header h4 {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}
.fa-modal-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-light);
}
.fa-tab {
    flex: 1;
    padding: 10px 0;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}
.fa-tab:hover { color: var(--text-primary); background: var(--bg-hover); }
.fa-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}
.fa-modal-search {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-light);
}
#fa-search-input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 8px 14px;
    font-size: 13px;
    outline: none;
    background: var(--bg-input);
    color: var(--text-primary);
    box-sizing: border-box;
}
#fa-search-input:focus { border-color: var(--primary); }
.fa-tab-content {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}
.fa-tab-content .feeling-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    padding: 6px;
}
.fa-tab-content .feeling-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: none;
    background: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
}
.fa-tab-content .feeling-option:hover { background: var(--bg-hover); }
.fo-emoji { font-size: 20px; flex-shrink: 0; }
.fo-label { font-weight: 500; }

/* Activity categories */
.activity-list { padding: 4px 6px; }
.activity-category { margin-bottom: 2px; }
.activity-cat-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.activity-cat-header:hover { background: var(--bg-hover); }
.activity-category.open > .activity-cat-header {
    color: var(--primary);
    background: var(--primary-light, #e7f3ff);
}
.activity-sub-items {
    padding-left: 20px;
}
.activity-sub-items .feeling-option {
    padding: 7px 10px;
    font-size: 13px;
}

/* ============================================
   POLL CREATION UI (Composer)
   ============================================ */
.composer-poll-section {
    margin-top: 12px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.poll-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-input);
    border-bottom: 1px solid var(--border-light);
}
.poll-section-header h4 {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}
.poll-section-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.poll-section-close:hover { color: var(--text-primary); }
.poll-options-list { padding: 8px 12px; }
.poll-option-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.poll-option-num {
    width: 22px;
    height: 22px;
    border-radius: var(--radius-full);
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    flex-shrink: 0;
}
.poll-option-input {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-white);
    outline: none;
    transition: var(--transition);
}
.poll-option-input:focus { border-color: var(--primary); }
.poll-option-input::placeholder { color: var(--text-muted); }
.poll-option-remove {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    opacity: 0;
    transition: var(--transition);
}
.poll-option-row:hover .poll-option-remove { opacity: 1; }
.poll-option-remove:hover { color: var(--danger); }
.poll-add-option-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 4px 12px 10px;
    padding: 8px 14px;
    background: none;
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    transition: var(--transition);
    width: calc(100% - 24px);
    justify-content: center;
}
.poll-add-option-btn:hover {
    background: var(--primary-light, #e7f3ff);
    border-color: var(--primary);
}

/* ============================================
   POLL DISPLAY IN FEED
   ============================================ */
.post-poll {
    padding: 12px 20px;
}
.poll-option-vote {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px 14px;
    margin-bottom: 6px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    cursor: pointer;
    overflow: hidden;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-primary);
    text-align: left;
    transition: var(--transition);
}
.poll-option-vote:hover {
    border-color: var(--primary);
}
.poll-locked .poll-option-vote {
    cursor: default;
}
.poll-locked .poll-option-vote:hover {
    border-color: var(--border);
}
.poll-locked .poll-option-vote.voted:hover {
    border-color: var(--primary);
}
.poll-option-vote.voted {
    border-color: var(--primary);
    background: var(--primary-light, #e7f3ff);
}
.poll-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: var(--primary-light, #e7f3ff);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    transition: width 0.4s ease;
    z-index: 0;
}
.poll-option-vote.voted .poll-bar {
    background: rgba(24, 119, 242, 0.15);
}
.poll-option-text {
    position: relative;
    z-index: 1;
    flex: 1;
    font-weight: 500;
}
.poll-option-pct {
    position: relative;
    z-index: 1;
    font-weight: 700;
    font-size: 13px;
    color: var(--text-secondary);
    margin-left: 10px;
}
.poll-option-vote.voted .poll-option-pct { color: var(--primary); }
.poll-check-icon {
    position: relative;
    z-index: 1;
    color: var(--primary);
    font-weight: 700;
    margin-left: 6px;
    font-size: 14px;
}
.poll-total-votes {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
    padding-left: 2px;
}

.composer-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding: 8px 0;
    border-top: 1px solid var(--border-light);
}
.composer-toolbar-label { font-size: var(--font-size-sm); font-weight: 600; color: var(--text-secondary); }
.toolbar-icons { display: flex; gap: 4px; }
.toolbar-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    background: none;
}
.toolbar-icon-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.toolbar-icon-btn svg { width: 20px; height: 20px; }
.submit-post-btn {
    width: 100%;
    padding: 10px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 12px;
}
.submit-post-btn:hover { background: var(--primary-dark); }
.submit-post-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============================================
   POSTS / FEED CARDS
   ============================================ */
.feed-post {
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-card);
    margin-bottom: 16px;
    overflow: hidden;
    transition: var(--transition-md);
}
.feed-post:hover { box-shadow: var(--shadow-hover); }


/* ============================================
   GROUP
   ============================================ */
.page-template-header{
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    padding: 20px 24px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    gap: 16px;
}

.group-tab-bar{
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    padding: 4px;
    margin-bottom: 16px;
    display: flex;
    box-shadow: var(--shadow-card);
}


/* Clickable group cards */
.group-card { transition: box-shadow 0.15s, transform 0.1s; }
.group-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }

.post-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 16px 16px 12px;
}
.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
}
.post-meta { flex: 1; }
.post-author {
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--text-primary);
    display: inline-block;
}
.post-author:hover { text-decoration: underline; }
.post-author-secondary {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
}
.post-author-secondary:hover { text-decoration: underline; }
.post-with { font-size: var(--font-size-sm); color: var(--text-secondary); }
.post-with .tagged-user { color: var(--primary); font-weight: 600; text-decoration: none; }
.post-with .tagged-user:hover { text-decoration: underline; }
.post-location {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}
.post-location svg { width: 12px; height: 12px; }
.post-time {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}
.post-time svg { width: 12px; height: 12px; }

.post-options-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}
.post-options-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

.post-content {
    padding: 0 16px 12px;
}
.post-content p {
    font-size: var(--font-size-base);
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 8px;
}
.post-content.large-text p { font-size: 24px; font-weight: 500; }
.post-content p:last-child { margin-bottom: 0; }
.post-content a { color: var(--primary); }

.post-media {
    position: relative;
    overflow: hidden;
    background: var(--bg-input);
}
.post-media img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
}
.post-media-grid {
    display: grid;
    gap: 2px;
}
.post-media-grid.grid-2 { grid-template-columns: 1fr 1fr; }
.post-media-grid.grid-3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.post-media-grid.grid-3 .media-item:first-child { grid-row: 1 / 3; }
.post-media-grid img { width: 100%; height: 200px; object-fit: cover; display: block; }
.post-media-grid.grid-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.media-item { position: relative; overflow: hidden; }
.media-item-more img { filter: brightness(0.5); }
.media-more-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    pointer-events: none;
}

.post-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 16px;
}
.post-reactions-count {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
}
.post-reactions-count.is-empty { display: none; }
.post-reactions-count:hover .reaction-total-count { text-decoration: underline; }
.reaction-icons { display: flex; }
.reaction-icon {
    width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    border: 2px solid var(--bg-white);
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: -6px;
    line-height: 1;
}
.reaction-icon:first-child { margin-left: 0; }
.reaction-icon-like  { background: #e7f3ff; }
.reaction-icon-love  { background: #fff0f3; }
.reaction-icon-haha  { background: #fffbe6; }
.reaction-icon-wow   { background: #fff3e0; }
.reaction-icon-sad   { background: #e6f4ff; }
.reaction-icon-angry { background: #fff0e6; }
/* Reactors tooltip */
.reactors-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    background: rgba(0, 0, 0, 0.82);
    color: #fff;
    border-radius: 8px;
    padding: 8px 12px;
    min-width: 160px;
    max-width: 260px;
    font-size: 12px;
    line-height: 1.8;
    z-index: 20;
    pointer-events: none;
    white-space: nowrap;
}
.reactors-tooltip.is-visible { display: block; }
.reactors-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 14px;
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.82);
}
.reactors-tooltip::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 8px;
}
.post-comments-shares {
    display: flex;
    gap: 12px;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}
.post-comments-shares span { cursor: pointer; }
.post-comments-shares span:hover { text-decoration: underline; }

.post-actions-bar {
    display: flex;
    padding: 4px 12px;
    border-top: 1px solid var(--border-light);
    gap: 4px;
}
.post-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    border-radius: var(--radius-sm);
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}
.post-action-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.post-action-btn.liked { color: var(--primary); }
.post-action-btn.liked svg { fill: var(--primary); }
.post-action-btn svg { width: 18px; height: 18px; }

/* Reaction Popup */
.reaction-popup {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    background: var(--bg-white);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    padding: 8px 12px;
    gap: 8px;
    z-index: 10;
}
.reaction-popup.is-open { display: flex; }
/* Invisible bridge fills the 8px gap so mouseleave doesn't fire mid-hover */
.reaction-popup::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 8px;
}
.reaction-btn {
    font-size: 28px;
    cursor: pointer;
    transition: transform 0.1s ease;
    border: none;
    background: none;
    line-height: 1;
}
.reaction-btn:hover { transform: scale(1.3) translateY(-4px); }

/* Like button wrapper */
.like-btn-wrapper { position: relative; flex: 1; }

/* ============================================
   COMMENTS SECTION
   ============================================ */
.comments-section {
    padding: 0 16px 12px;
    display: none;
}
.comments-section.is-open { display: block; }
.top-comments-link {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-weight: 600;
    display: block;
    padding: 4px 0 8px;
    cursor: pointer;
}
.top-comments-link:hover { text-decoration: underline; }

.comment {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}
.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
}
.comment-bubble {
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    max-width: calc(100% - 40px);
}
.comment-bubble .comment-author {
    font-size: var(--font-size-xs);
    font-weight: 700;
    display: block;
    margin-bottom: 2px;
}
.comment-bubble p { font-size: var(--font-size-sm); line-height: 1.4; }
.comment-meta {
    display: flex;
    gap: 12px;
    margin-top: 4px;
    padding-left: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}
.comment-meta button {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.comment-meta button:hover { text-decoration: underline; }
.comment-meta button.liked { color: var(--primary); }

.comment-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
    padding-top: 4px;
}
.comment-input-row img {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
}
.comment-input-wrapper {
    flex: 1;
    background: var(--bg-input);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    padding: 6px 12px;
    gap: 8px;
}
.comment-input-wrapper input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-size: var(--font-size-sm);
    color: var(--text-primary);
}
.comment-input-wrapper input::placeholder { color: var(--text-secondary); }
.comment-submit {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}
.comment-submit:disabled { opacity: 0.4; cursor: not-allowed; }
.comment-submit svg { width: 20px; height: 20px; }

/* ============================================
   RIGHT SIDEBAR
   ============================================ */
#secondary-right {
    width: var(--sidebar-right-width);
    padding: 8px 0 8px 8px;
    position: sticky;
    top: calc(var(--header-height) + 8px);
    max-height: calc(100vh - var(--header-height) - 16px);
    overflow-y: auto;
    scrollbar-width: none;
}
#secondary-right::-webkit-scrollbar { display: none; }

.widget-card {
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-card);
}
.widget-title {
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Online Users */
.online-user-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.online-user-item:hover { padding-left: 4px; }
.online-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}
.online-avatar-wrapper img {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    object-fit: cover;
}
.online-dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: var(--radius-full);
    border: 2px solid var(--bg-white);
}
.online-user-name {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-primary);
}

/* Recent Activity */
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}
.activity-item:last-child { border-bottom: none; padding-bottom: 0; }
.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.activity-icon svg { width: 16px; height: 16px; color: var(--primary); }
.activity-text { font-size: 12px; color: var(--text-secondary); line-height: 1.4; }
.activity-text strong { color: var(--text-primary); font-weight: 600; }
.activity-time { font-size: 11px; color: var(--text-muted); display: block; margin-top: 2px; }

/* Suggested Groups */
.suggested-group {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}
.suggested-group:last-child { border-bottom: none; }
.group-thumb {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    overflow: hidden;
}
.group-thumb img { width: 100%; height: 100%; object-fit: cover; }
.group-info { flex: 1; }
.group-name { font-size: var(--font-size-sm); font-weight: 600; color: var(--text-primary); display: block; }
.group-meta { font-size: 12px; color: var(--text-secondary); }
.join-group-btn {
    padding: 6px 14px;
    background: var(--primary-light);
    color: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}
.join-group-btn:hover { background: var(--primary); color: white; }

/* ============================================
   EVENTS WIDGET (IDMCC Calendar)
   ============================================ */
.event-item {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
    align-items: flex-start;
}
.event-item:last-child { border-bottom: none; }
.event-date-badge {
    width: 40px;
    flex-shrink: 0;
    text-align: center;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    padding: 4px;
}
.event-date-badge .month {
    font-size: 10px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    display: block;
}
.event-date-badge .day {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
    display: block;
    line-height: 1.2;
}
.event-info { flex: 1; }
.event-name { font-size: var(--font-size-sm); font-weight: 600; color: var(--text-primary); display: block; }
.event-time { font-size: 12px; color: var(--text-secondary); display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.event-time svg { width: 12px; height: 12px; }
.event-attending {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}
.rsvp-btn {
    padding: 4px 10px;
    background: var(--primary-light);
    color: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 4px;
    display: inline-block;
}
.rsvp-btn:hover { background: var(--primary); color: white; }
.rsvp-btn.going { background: var(--success); color: white; }

/* ============================================
   LOADING / SKELETON
   ============================================ */
.skeleton {
    background: linear-gradient(90deg, var(--bg-input) 25%, var(--border-light) 50%, var(--bg-input) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.skeleton-post {
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-card);
}
.skeleton-line { height: 14px; margin-bottom: 8px; }
.skeleton-avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }

/* ============================================
   INFINITE SCROLL LOADER
   ============================================ */
.feed-loading-spinner {
    display: flex;
    justify-content: center;
    padding: 24px;
}
.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================
   NOTIFICATIONS PANEL
   ============================================ */
.notifications-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    width: 360px;
    max-height: 500px;
    overflow-y: auto;
    display: none;
    z-index: 100;
}
.notifications-panel.is-open { display: block; }
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    position: sticky;
    top: 0;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    z-index: 1;
}
.panel-header h3 { font-size: var(--font-size-lg); font-weight: 700; }
.panel-header a { font-size: var(--font-size-sm); color: var(--primary); font-weight: 600; }

.notification-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}
.notification-item:hover { background: var(--bg-hover); }
.notification-item.unread { background: var(--primary-light); }
.notification-item.unread:hover { background: #d9e8fc; }
.notif-avatar { position: relative; flex-shrink: 0; }
.notif-avatar img { width: 44px; height: 44px; border-radius: var(--radius-full); object-fit: cover; }
.notif-type-icon {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    border: 2px solid var(--bg-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}
.notif-type-icon.like { background: #1877F2; }
.notif-type-icon.comment { background: var(--success); }
.notif-type-icon.event { background: var(--danger); }
.notif-text { font-size: var(--font-size-sm); color: var(--text-primary); line-height: 1.4; flex: 1; }
.notif-text strong { font-weight: 700; }
.notif-time { font-size: 12px; color: var(--primary); font-weight: 600; display: block; margin-top: 2px; }
.notif-dot {
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: var(--radius-full);
    flex-shrink: 0;
    align-self: center;
}

/* ============================================
   FOOTER
   ============================================ */
#colophon {
    background: var(--bg-white);
    border-top: 1px solid var(--border-light);
    padding: 16px;
    margin-top: auto;
}
.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: center;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.footer-links a {
    font-size: 12px;
    color: var(--text-secondary);
    text-decoration: none;
}
.footer-links a:hover { text-decoration: underline; }
.footer-copy {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: auto;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.text-sm { font-size: var(--font-size-sm); }
.text-muted { color: var(--text-secondary); }
.font-bold { font-weight: 700; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mb-4 { margin-bottom: 4px; }

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
#toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}
.toast {
    background: #333;
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: 600;
    box-shadow: var(--shadow-md);
    animation: fadeInUp 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
    pointer-events: none;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeOut {
    to { opacity: 0; transform: translateY(-8px); }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
    :root { --sidebar-right-width: 240px; }
    .main-content-wrapper {
        grid-template-columns: var(--sidebar-width) 1fr var(--sidebar-right-width);
    }
}

@media (max-width: 960px) {
    .main-content-wrapper {
        grid-template-columns: var(--sidebar-width) 1fr;
    }
    #secondary-right { display: none; }
}

@media (max-width: 640px) {
    :root { --sidebar-width: 0px; --header-height: 52px; }
    #masthead {
        grid-template-columns: auto 1fr auto;
    }
    .main-content-wrapper {
        grid-template-columns: 1fr;
        padding: 0;
    }
    #secondary-left { display: none; }
    .header-logo .site-tagline { display: none; }
    .composer-action-btn span { display: none; }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    #masthead, #secondary-left, #secondary-right, #colophon { display: none; }
    .site-content-area { padding-top: 0; }
    .feed-post { box-shadow: none; border: 1px solid #ddd; }
}

/* ============================================
   LIGHTBOX
   ============================================ */
#ws-lightbox-simple {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
}
#ws-lightbox-simple-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
}
#ws-lightbox-simple-img {
    position: relative;
    max-width: 92vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
    z-index: 1;
}
#ws-lightbox-simple-close,
#ws-lightbox-simple-prev,
#ws-lightbox-simple-next {
    position: absolute;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    z-index: 2;
}
#ws-lightbox-simple-close:hover,
#ws-lightbox-simple-prev:hover,
#ws-lightbox-simple-next:hover { background: rgba(0, 0, 0, 0.8); }
#ws-lightbox-simple-close { top: 16px; right: 16px; width: 40px; height: 40px; font-size: 22px; }
#ws-lightbox-simple-prev  { left: 16px;  top: 50%; transform: translateY(-50%); width: 44px; height: 44px; font-size: 28px; }
#ws-lightbox-simple-next  { right: 16px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; font-size: 28px; }
body.ws-lightbox-open { overflow: hidden; }

/* ============================================================
   EVENTS PAGE — FACEBOOK STYLE
   ============================================================ */

/* Full-width layout override */
body.page-events-full .main-content-wrapper {
    grid-template-columns: 1fr;
    padding: 0 8px;
}
body.page-events-full #primary.site-main {
    max-width: 100%;
    padding: 0;
}

/* Two-panel flex layout */
.events-page {
    display: flex;
    align-items: flex-start;
    width: 100%;
    min-height: calc(100vh - var(--header-height));
}

/* ── Left nav panel ─────────────────────────────────── */
.events-nav-panel {
    width: 360px;
    min-width: 260px;
    flex-shrink: 0;
    padding: 16px 8px;
    position: sticky;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    border-right: 1px solid var(--border-light);
    background: var(--bg-white);
    box-sizing: border-box;
}
.events-nav-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    padding: 8px 12px;
    margin: 0 0 12px;
}
.events-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-input);
    border-radius: var(--radius-full);
    padding: 8px 14px;
    margin: 0 8px 12px;
}
.events-search-box input {
    background: none;
    border: none;
    outline: none;
    font-size: 13px;
    width: 100%;
    color: var(--text-primary);
}
.events-nav-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 12px;
    padding: 0 4px;
}
.events-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
    transition: background var(--transition);
}
.events-nav-link:hover,
.events-nav-link.active { background: var(--bg-hover); }
.events-nav-icon-wrap {
    width: 36px;
    height: 36px;
    background: var(--bg-input);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.create-event-trigger {
    display: block;
    width: calc(100% - 16px);
    margin: 0 8px 16px;
    padding: 10px 16px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition);
}
.create-event-trigger:hover { background: var(--primary-dark); }
.events-panel-divider {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: 4px 12px 12px;
}
.events-categories-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 12px;
    margin: 0 0 6px;
}
.events-category-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    transition: background var(--transition);
}
.events-category-link:hover,
.events-category-link.active { background: var(--bg-hover); }
.events-cat-icon {
    width: 36px;
    height: 36px;
    background: var(--bg-input);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

/* ── Content area ───────────────────────────────────── */
.events-content-area {
    flex: 1;
    min-width: 0;
    padding: 20px 24px;
    overflow-y: auto;
    max-height: calc(100vh - var(--header-height));
}
.events-discover-header {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 16px;
}

/* Filter tabs */
.events-filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.events-filter-tab {
    padding: 6px 16px;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--border);
    background: var(--bg-white);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.events-filter-tab.active,
.events-filter-tab:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ── Event cards grid ───────────────────────────────── */
.events-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}
.event-card {
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: box-shadow var(--transition-md), transform var(--transition-md);
    display: flex;
    flex-direction: column;
}
.event-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}
.event-card-img-link {
    display: block;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--bg-input);
    position: relative;
    text-decoration: none;
}
.event-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}
.event-card:hover .event-card-img { transform: scale(1.04); }
.event-card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    background: linear-gradient(135deg, var(--primary-light), #e8e8e8);
}
.event-card-more-menu {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: rgba(0,0,0,0.45);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    text-decoration: none;
}
.event-card-body {
    padding: 12px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.event-card-date {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.event-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.event-card-title:hover { color: var(--primary); }
.event-card-venue {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.event-card-counts {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}
.event-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-light);
}
.event-interested-card-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 7px 10px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.event-interested-card-btn:hover,
.event-interested-card-btn.is-active {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}
.event-share-card-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
    flex-shrink: 0;
    transition: background var(--transition);
}
.event-share-card-btn:hover { background: var(--bg-hover); }

/* ── Single event view ──────────────────────────────── */
.single-event-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}
.single-event-back:hover { color: var(--text-primary); }
.single-event-hero {
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    /* overflow must stay visible so the ellipsis dropdown is not clipped */
    overflow: visible;
    box-shadow: var(--shadow-card);
    margin-bottom: 16px;
}
.single-event-cover-img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    display: block;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.single-event-cover-placeholder {
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, var(--ws-blue), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.single-event-info { padding: 20px 24px; }
.single-event-date-range {
    font-size: 14px;
    font-weight: 700;
    color: var(--danger);
    margin-bottom: 8px;
}
.single-event-title {
    font-size: 28px;
    font-weight: 900;
    color: var(--text-primary);
    margin: 0 0 6px;
    line-height: 1.2;
}
.single-event-venue-info {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}
.single-event-tabs-row {
    display: flex;
    border-bottom: 2px solid var(--border-light);
    margin-bottom: 16px;
}
.single-event-tab {
    padding: 10px 16px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color var(--transition);
}
.single-event-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}
.single-event-actions-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    position: relative; /* establish stacking context so dropdown sits above siblings */
    overflow: visible;
}
.event-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid var(--border);
    background: var(--bg-white);
    color: var(--text-primary);
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.event-action-btn:hover { background: var(--bg-hover); }
.event-action-btn.is-active {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}
.event-action-btn.going-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.event-action-icon-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    background: var(--bg-white);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
    transition: background var(--transition);
}
.event-action-icon-btn:hover { background: var(--bg-hover); }

/* Two-column content below hero */
.single-event-content-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 16px;
    align-items: start;
}
.single-event-details-card,
.single-event-host-card,
.event-description-card,
.single-event-map-card,
.single-event-guests-card {
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-card);
    margin-bottom: 16px;
}
.single-event-details-card,
.single-event-host-card,
.event-description-card { padding: 20px 24px; }
.single-event-details-card h3,
.single-event-host-card h3 {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 14px;
    color: var(--text-primary);
}
.event-detail-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 7px 0;
    font-size: 14px;
    color: var(--text-secondary);
}
.event-detail-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}
.event-detail-text { padding-top: 8px; flex: 1; }
.event-detail-text a { color: var(--primary); text-decoration: none; font-weight: 600; }
.event-description-card {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
}
.single-event-map-card { overflow: hidden; }
.single-event-map-img {
    width: 100%;
    height: 180px;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--text-muted);
}
.single-event-map-venue { padding: 12px 16px; }
.single-event-map-venue h4 {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--text-primary);
}
.single-event-map-venue p { font-size: 13px; color: var(--text-secondary); margin: 0; }
.single-event-guests-card { padding: 16px; }
.single-event-guests-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.single-event-guests-header h4 {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}
.single-event-guests-header a {
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}
.guests-counts { display: flex; gap: 24px; margin-bottom: 12px; }
.guests-count-item { text-align: center; }
.guests-count-num { font-size: 20px; font-weight: 800; color: var(--text-primary); }
.guests-count-label { font-size: 12px; color: var(--text-secondary); }
.guests-avatar-row { display: flex; gap: 4px; flex-wrap: wrap; }
.guests-avatar-row img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--bg-white);
}
.single-event-host-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 0;
}
.single-event-host-item img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
}
.single-event-host-name { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.single-event-host-meta { font-size: 13px; color: var(--text-secondary); }

/* ── Create Event Modal ─────────────────────────────── */
.events-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 2000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 20px;
    overflow-y: auto;
}
.events-modal-box {
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    width: 100%;
    max-width: 520px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    animation: slideDown 0.2s ease;
    margin: 0 16px 40px;
}
.events-modal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    position: relative;
}
.events-modal-header h3 {
    font-size: 17px;
    font-weight: 800;
    margin: 0;
    color: var(--text-primary);
}
.events-modal-close {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-input);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    transition: background var(--transition);
}
.events-modal-close:hover { background: var(--border); }
.events-modal-body {
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}
.event-cover-zone {
    height: 200px;
    background: var(--bg-input);
    position: relative;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.event-cover-zone img { width: 100%; height: 100%; object-fit: cover; }
.event-cover-add-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--bg-white);
    color: var(--text-primary);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition);
    z-index: 2;
}
.event-cover-add-btn:hover { background: var(--bg-hover); }

/* ── Group Event List Cards ─────────────────────────────────── */
.ge-event-card {
    display: flex;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
}
.ge-event-card.ge-event-past { opacity: 0.55; }
.ge-event-image {
    width: 140px;
    height: 100px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.ge-event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ge-event-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}
.ge-event-date-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255,255,255,0.95);
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    text-align: center;
    line-height: 1.1;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.ge-badge-month {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ge-badge-day {
    display: block;
    font-size: 20px;
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1;
}
.ge-event-details { flex: 1; min-width: 0; }
.ge-event-title { font-size: 14px; font-weight: 700; }
.ge-status-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
}
.ge-status-upcoming { background: #dcfce7; color: #16a34a; }
.ge-status-past { background: var(--bg-input); color: var(--text-muted); }
.ge-event-datetime { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.ge-event-location { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.ge-event-host { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.ge-event-excerpt { font-size: 13px; color: var(--text-secondary); margin: 6px 0 0; }

/* ── Feed Event Card (News Feed rendering) ──────────────────── */
.feed-event-card {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin: 0 -4px;
}
.feed-event-cover {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.feed-event-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.feed-event-cover-default {
    display: flex;
    align-items: center;
    justify-content: center;
}
.feed-event-cover-default::after {
    content: '📅';
    font-size: 48px;
    opacity: 0.6;
}
.feed-event-date-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255,255,255,0.95);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    text-align: center;
    line-height: 1.1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.feed-ev-badge-month {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.feed-ev-badge-day {
    display: block;
    font-size: 22px;
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1;
}
.feed-event-info {
    padding: 14px 16px;
    background: var(--bg-input);
}
.feed-event-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--text-primary);
}
.feed-event-meta {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.feed-event-location {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}
.feed-event-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 8px 0 0;
    line-height: 1.4;
}
.feed-event-link {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: opacity var(--transition);
}
.feed-event-link:hover { opacity: 0.85; }

.create-event-form {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.event-host-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
}
.event-host-row img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.event-host-info { flex: 1; }
.event-host-name { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.event-host-label { font-size: 12px; color: var(--text-secondary); }
.event-form-input,
.event-form-textarea,
.event-form-select {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-white);
    outline: none;
    box-sizing: border-box;
    font-family: var(--font-body);
    transition: border-color var(--transition);
}
.event-form-input:focus,
.event-form-textarea:focus,
.event-form-select:focus { border-color: var(--primary); }
.event-form-input::placeholder,
.event-form-textarea::placeholder { color: var(--text-muted); }
.event-form-textarea { resize: vertical; min-height: 90px; }
.event-form-select { appearance: none; cursor: pointer; }
.event-datetime-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}
.event-datetime-grid input,
.event-datetime-grid select {
    padding: 10px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-primary);
    background: var(--bg-white);
    outline: none;
    box-sizing: border-box;
    cursor: pointer;
    font-family: var(--font-body);
}
.event-datetime-grid input:focus,
.event-datetime-grid select:focus { border-color: var(--primary); }
.event-end-toggle {
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    margin-top: -4px;
}
.create-event-submit-btn {
    width: 100%;
    padding: 12px;
    background: var(--bg-input);
    color: var(--text-muted);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 700;
    cursor: not-allowed;
    transition: background var(--transition), color var(--transition);
}
.create-event-submit-btn.ready {
    background: var(--primary);
    color: #fff;
    cursor: pointer;
}
.create-event-submit-btn.ready:hover { background: var(--primary-dark); }

/* Empty state */
.events-empty-state {
    text-align: center;
    padding: 60px 32px;
    color: var(--text-secondary);
}
.events-empty-state .empty-icon { font-size: 64px; margin-bottom: 16px; }
.events-empty-state h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

/* Responsive */
@media (max-width: 1100px) {
    .events-nav-panel { width: 280px; min-width: 220px; }
    .single-event-content-grid { grid-template-columns: 1fr 280px; }
}
@media (max-width: 800px) {
    .events-page { flex-direction: column; }
    .events-nav-panel {
        width: 100%;
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid var(--border-light);
    }
    .events-content-area { max-height: none; }
    .single-event-content-grid { grid-template-columns: 1fr; }
    .events-card-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
    .single-event-title { font-size: 22px; }
}
@media (max-width: 480px) {
    .events-card-grid { grid-template-columns: 1fr; }
    .event-datetime-grid { grid-template-columns: 1fr 1fr; }
    .event-datetime-grid select:last-child { grid-column: 1 / -1; }
}

/* ── Event Discussion Tab ───────────────────────────────────── */
.event-discussion-wrap { padding: 16px 0; }
.event-discussion-heading {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-secondary);
    margin: 0 0 12px;
}
.event-disc-post {
    display: flex;
    gap: 10px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
}
.event-disc-post:last-of-type { border-bottom: none; }
.event-disc-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.event-disc-body { flex: 1; min-width: 0; }
.event-disc-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.event-disc-author { font-weight: 600; font-size: 14px; color: var(--text-primary); }
.event-disc-time { font-size: 12px; color: var(--text-muted); }
.event-disc-content { font-size: 14px; color: var(--text-primary); line-height: 1.5; }
.event-disc-content p { margin: 0 0 6px; }
.event-disc-empty { text-align: center; padding: 32px 0; color: var(--text-muted); font-size: 14px; }
.event-disc-form {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}
.event-disc-compose-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.event-disc-compose-right { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.event-disc-textarea {
    width: 100%;
    min-height: 72px;
    padding: 10px 12px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 14px;
    resize: vertical;
    color: var(--text-primary);
    background: var(--bg-white);
    box-sizing: border-box;
}
.event-disc-textarea:focus { outline: none; border-color: var(--primary); }
.event-disc-submit {
    align-self: flex-end;
    padding: 7px 18px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.event-disc-submit:hover { background: var(--primary-dark); }

/* ── Event More / Ellipsis Dropdown ────────────────────────── */
.event-more-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    min-width: 170px;
    z-index: 9999;
    padding: 4px 0;
}
.event-more-item {
    display: block;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    text-align: left;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    white-space: nowrap;
}
.event-more-item:hover { background: var(--bg-hover); }
.event-more-item--danger { color: var(--danger); }
.event-more-item--muted { color: var(--text-muted); cursor: default; }
.event-more-item--muted:hover { background: none; }

/* ── Invite Modal ───────────────────────────────────────────── */
.invite-user-list {
    max-height: 340px;
    overflow-y: auto;
}
.invite-user-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}
.invite-user-row:last-child { border-bottom: none; }
.invite-user-row img {
    width: 36px; height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.invite-user-name { flex: 1; font-size: 14px; font-weight: 500; color: var(--text-primary); }
.invite-send-btn {
    padding: 5px 14px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
}
.invite-send-btn:hover { background: var(--primary-dark); }
.invite-send-btn.invited { background: var(--accent); cursor: default; }
.invite-already-label {
    font-size: 12px;
    color: var(--text-muted);
    padding: 5px 10px;
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

/* ── Admin: Inline Add Event Category ───────────────────────── */
.event-add-cat-wrap {
    margin-top: -4px;
}
.event-add-cat-toggle {
    background: none;
    border: none;
    padding: 0;
    font-size: 13px;
    color: var(--primary);
    cursor: pointer;
    line-height: 1.5;
}
.event-add-cat-toggle:hover { text-decoration: underline; }
.event-add-cat-row {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    align-items: center;
}
.event-add-cat-row .event-form-input {
    flex: 1;
    margin: 0;
}
/* Emoji trigger button */
.event-emoji-trigger {
    width: 48px;
    height: 42px;
    flex-shrink: 0;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .15s, background .15s;
}
.event-emoji-trigger:hover { border-color: var(--primary); background: var(--bg-hover); }
[data-theme="dark"] .event-emoji-trigger {
    background: var(--bg-card);
    border-color: var(--border-dark, var(--border-light));
}

/* Emoji picker popup */
.event-emoji-picker {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    padding: 8px;
    display: grid;
    grid-template-columns: repeat(8, 32px);
    gap: 2px;
    z-index: 9999;
    width: 280px;
}
.event-emoji-opt {
    width: 32px;
    height: 32px;
    font-size: 20px;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .1s;
    line-height: 1;
}
.event-emoji-opt:hover { background: var(--bg-hover); }
[data-theme="dark"] .event-emoji-picker {
    background: var(--bg-card);
    border-color: var(--border-dark, var(--border-light));
}
.event-add-cat-btn {
    padding: 8px 16px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}
.event-add-cat-btn:hover { background: var(--primary-dark, var(--primary)); }
.event-add-cat-btn:disabled { opacity: .6; cursor: default; }
[data-theme="dark"] .event-add-cat-toggle { color: var(--primary-light, var(--primary)); }

/* ══════════════════════════════════════════════════════════════
   FEED WIDGETS: Events & People You May Know
   ══════════════════════════════════════════════════════════════ */

/* Shared widget card wrapper */
.feed-widget-card {
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-card);
    padding: 16px 20px 20px;
    margin-bottom: 16px;
}
.feed-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.feed-widget-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}
.feed-widget-see-all {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}
.feed-widget-see-all:hover { text-decoration: underline; }
.feed-widget-more-btn {
    background: none;
    border: none;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
}
.feed-widget-more-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

/* ── Feed Events ─────────────────────────────────────────────── */
.feed-events-scroll-wrap {
    position: relative;
}
.feed-events-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
}
.feed-events-scroll::-webkit-scrollbar { display: none; }
.feed-event-card {
    flex: 0 0 calc(50% - 6px);
    min-width: 220px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.feed-event-thumb {
    width: 100%;
    height: 150px;
    overflow: hidden;
    background: var(--bg-hover);
    flex-shrink: 0;
}
.feed-event-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.feed-event-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    background: linear-gradient(135deg, var(--ws-blue, #1877f2), var(--primary));
}
.feed-event-body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}
.feed-event-date {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: .3px;
}
.feed-event-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.feed-event-title:hover { text-decoration: underline; }
.feed-event-location {
    font-size: 12px;
    color: var(--text-secondary);
}
.feed-event-counts {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}
.feed-event-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    align-items: center;
}
.feed-event-rsvp-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 7px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}
.feed-event-rsvp-btn:hover { background: var(--bg-hover); }
.feed-event-rsvp-btn.active {
    background: var(--primary-light, #e8f0fe);
    border-color: var(--primary);
    color: var(--primary);
}
.feed-event-share-btn {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}
.feed-event-share-btn:hover { background: var(--bg-hover); color: var(--primary); }
/* Scroll nav arrows */
.feed-events-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    color: var(--text-secondary);
    transition: background .15s;
}
.feed-events-nav:hover { background: var(--bg-hover); color: var(--text-primary); }
.feed-events-prev { left: -14px; }
.feed-events-next { right: -14px; }

/* ── People You May Know ─────────────────────────────────────── */
.feed-people-scroll-wrap { position: relative; }
.feed-people-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
}
.feed-people-scroll::-webkit-scrollbar { display: none; }
.feed-person-card {
    flex: 0 0 160px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 16px 12px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
}
.feed-person-dismiss {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,.12);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}
.feed-person-dismiss:hover { background: rgba(0,0,0,.22); }
.feed-person-photo-link { display: block; }
.feed-person-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}
.feed-person-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    text-align: center;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}
.feed-person-name:hover { text-decoration: underline; }
.feed-person-role {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    text-align: center;
    margin-top: -2px;
}
.feed-person-mutual {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
}
.feed-person-mutual-avatars {
    display: flex;
}
.feed-person-mutual-avatars img {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid var(--bg-white);
    margin-left: -4px;
    object-fit: cover;
}
.feed-person-mutual-avatars img:first-child { margin-left: 0; }
.feed-person-add-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 7px 10px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    margin-top: auto;
}
.feed-person-add-btn:hover { background: var(--primary-light, #e8f0fe); border-color: var(--primary); color: var(--primary); }
.feed-person-add-btn.sent { background: var(--bg-hover); color: var(--text-muted); border-color: var(--border-light); cursor: default; }
.feed-person-add-btn:disabled { opacity: .6; cursor: default; }
/* Nav arrow */
.feed-people-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    color: var(--text-secondary);
    transition: background .15s;
}
.feed-people-nav:hover { background: var(--bg-hover); }
.feed-people-prev { left: -14px; }
.feed-people-next { right: -14px; }
/* Dark mode */
[data-theme="dark"] .feed-widget-card,
[data-theme="dark"] .feed-event-card,
[data-theme="dark"] .feed-person-card {
    background: var(--bg-card);
    border-color: var(--border-dark, var(--border-light));
}
[data-theme="dark"] .feed-event-rsvp-btn,
[data-theme="dark"] .feed-event-share-btn,
[data-theme="dark"] .feed-person-add-btn,
[data-theme="dark"] .feed-events-nav,
[data-theme="dark"] .feed-people-nav {
    background: var(--bg-card);
    border-color: var(--border-dark, var(--border-light));
}

/* ============================================================
   ANNOUNCEMENTS PAGE
   ============================================================ */

/* Page wrapper */
.ann-page {
    max-width: 780px;
    margin: 0 auto;
    padding: 24px 16px 64px;
}

/* ── Hero banner ─────────────────────────────────────────── */
.ann-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: linear-gradient(135deg, #1877f2 0%, #0e5dbe 100%);
    border-radius: var(--radius-sm);
    padding: 28px 32px;
    margin-bottom: 20px;
    color: #fff;
}
.ann-hero-left {
    display: flex;
    align-items: center;
    gap: 18px;
}
.ann-hero-icon {
    font-size: 42px;
    line-height: 1;
    flex-shrink: 0;
}
.ann-hero-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 4px;
    color: #fff;
}
.ann-hero-sub {
    font-size: 14px;
    margin: 0;
    opacity: .85;
    color: #fff;
}
.ann-create-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    background: rgba(255,255,255,.18);
    color: #fff;
    border: 1.5px solid rgba(255,255,255,.5);
    border-radius: var(--radius-pill, 999px);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, border-color .15s;
    flex-shrink: 0;
}
.ann-create-btn:hover {
    background: rgba(255,255,255,.3);
    border-color: rgba(255,255,255,.8);
}

/* ── Filter bar ──────────────────────────────────────────── */
.ann-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.ann-filter-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.ann-filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: var(--radius-pill, 999px);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background .15s, color .15s;
}
.ann-filter-tab:hover { background: var(--bg-hover); color: var(--text-primary); }
.ann-filter-tab.active {
    background: var(--primary-light, #e8f0fe);
    color: var(--primary, #1877f2);
    font-weight: 600;
}
.ann-total-count {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ── Announcement list ───────────────────────────────────── */
.ann-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ── Card ────────────────────────────────────────────────── */
.ann-card {
    display: flex;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s, transform .2s;
}
.ann-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.ann-card.is-pinned { border-color: var(--primary, #1877f2); }

/* Colored left accent bar */
.ann-card-priority-bar {
    width: 5px;
    flex-shrink: 0;
    background: var(--priority-color, #1877f2);
    border-radius: 0;
}

.ann-card-inner {
    flex: 1;
    padding: 18px 20px;
    min-width: 0;
}

/* Card top: badges + more menu */
.ann-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}
.ann-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.ann-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-pill, 999px);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em;
}
.ann-badge-pinned {
    background: #fff8e1;
    color: #b45309;
}

/* More menu (···) */
.ann-card-more-wrap {
    position: relative;
    flex-shrink: 0;
}
.ann-card-more-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-muted);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    transition: background .15s;
}
.ann-card-more-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.ann-card-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 160px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    overflow: hidden;
}
.ann-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 9px 14px;
    border: none;
    background: transparent;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
    transition: background .12s;
}
.ann-dropdown-item:hover { background: var(--bg-hover); }
.ann-dropdown-danger { color: #e53e3e; }
.ann-dropdown-danger:hover { background: #fff5f5; }

/* Author row */
.ann-card-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.ann-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.ann-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.ann-author-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}
.ann-author-meta {
    font-size: 12px;
    color: var(--text-muted);
}

/* Card body: text + optional cover image */
.ann-card-body {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 14px;
}
.ann-card-text { flex: 1; min-width: 0; }
.ann-card-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 6px;
}
.ann-card-title a {
    color: var(--text-primary);
    text-decoration: none;
}
.ann-card-title a:hover { color: var(--primary); text-decoration: underline; }
.ann-card-excerpt {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ann-card-cover-link { flex-shrink: 0; }
.ann-card-cover-img {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    display: block;
}

/* Card footer */
.ann-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-lighter, var(--border-light));
    flex-wrap: wrap;
}
.ann-card-footer-actions { display: flex; align-items: center; gap: 10px; }
.ann-footer-read-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary, #1877f2);
    text-decoration: none;
    transition: gap .15s;
}
.ann-footer-read-more:hover { gap: 8px; }
.ann-card-footer-meta { display: flex; align-items: center; gap: 12px; }
.ann-footer-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: none;
}
.ann-footer-meta-item:hover { color: var(--text-secondary); }

/* Empty state */
.ann-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
}
.ann-empty-icon { font-size: 52px; margin-bottom: 16px; }
.ann-empty-state h3 { font-size: 18px; font-weight: 700; margin: 0 0 8px; color: var(--text-primary); }
.ann-empty-state p  { font-size: 14px; color: var(--text-secondary); margin: 0 0 20px; }
.ann-empty-state .ann-create-btn {
    background: var(--primary, #1877f2);
    color: #fff;
    border-color: var(--primary, #1877f2);
    padding: 10px 22px;
}
.ann-empty-state .ann-create-btn:hover { background: var(--primary-dark, #1255c0); }

/* ── Create Announcement Modal ───────────────────────────── */
.ann-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(3px);
}
.ann-modal {
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    width: 100%;
    max-width: 560px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    display: flex;
    flex-direction: column;
}
.ann-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    background: var(--bg-white);
    z-index: 1;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.ann-modal-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}
.ann-modal-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: var(--bg-hover);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    flex-shrink: 0;
}
.ann-modal-close:hover { background: var(--border-light); color: var(--text-primary); }

/* Author preview inside modal */
.ann-modal-author {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-light);
}
.ann-modal-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.ann-modal-author-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}
.ann-modal-author-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Form body */
#ann-create-form {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Priority selector */
.ann-priority-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.ann-priority-option { display: flex; }
.ann-priority-option input[type="radio"] { display: none; }
.ann-priority-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 16px;
    border-radius: var(--radius-pill, 999px);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    background: var(--bg-hover);
    color: var(--text-secondary);
    transition: background .15s, border-color .15s, color .15s;
    user-select: none;
}
.ann-priority-option input:checked + .ann-priority-pill {
    background: var(--p-bg, #e7f0fd);
    color: var(--p-color, #1877f2);
    border-color: var(--p-color, #1877f2);
}

/* Text inputs */
.ann-form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-input, var(--bg-white));
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
}
.ann-form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(24,119,242,.12); }
.ann-title-input { font-size: 16px; font-weight: 600; }
.ann-title-input::placeholder { font-weight: 400; }

.ann-form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-input, var(--bg-white));
    outline: none;
    resize: vertical;
    min-height: 110px;
    font-family: inherit;
    line-height: 1.6;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
}
.ann-form-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(24,119,242,.12); }

/* Cover image upload zone */
.ann-cover-zone {
    border: 2px dashed var(--border-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input, #fafafa);
}
.ann-cover-zone:hover { border-color: var(--primary); background: var(--primary-light, #e8f0fe); }
.ann-cover-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 20px;
    color: var(--text-muted);
    pointer-events: none;
}
.ann-cover-placeholder span { font-size: 13px; }
.ann-cover-zone img#ga-cover-preview {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    display: block;
    border-radius: 0;
}

/* Pin checkbox row */
.ann-pin-row {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
}
.ann-pin-row input[type="checkbox"] { width: 15px; height: 15px; cursor: pointer; accent-color: var(--primary); }

/* Error message */
.ann-form-error {
    background: #fff0f0;
    color: #c53030;
    border: 1px solid #feb2b2;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 13px;
}

/* Modal footer */
.ann-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 4px;
}
.ann-modal-cancel {
    padding: 9px 20px;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background .15s;
}
.ann-modal-cancel:hover { background: var(--bg-hover); }
.ann-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 22px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--primary, #1877f2);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, opacity .15s;
}
.ann-submit-btn:hover:not(:disabled) { background: var(--primary-dark, #1255c0); }
.ann-submit-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Dark mode ───────────────────────────────────────────── */
[data-theme="dark"] .ann-hero { background: linear-gradient(135deg, #1255c0 0%, #0a3d87 100%); }
[data-theme="dark"] .ann-filter-bar,
[data-theme="dark"] .ann-card,
[data-theme="dark"] .ann-empty-state,
[data-theme="dark"] .ann-modal { background: var(--bg-card); border-color: var(--border-dark, #3a3a4a); }
[data-theme="dark"] .ann-modal-header { background: var(--bg-card); border-color: var(--border-dark, #3a3a4a); }
[data-theme="dark"] .ann-card-dropdown { background: var(--bg-card); border-color: var(--border-dark, #3a3a4a); }
[data-theme="dark"] .ann-dropdown-item { color: var(--text-primary); }
[data-theme="dark"] .ann-dropdown-item:hover { background: var(--bg-hover); }
[data-theme="dark"] .ann-dropdown-danger:hover { background: rgba(229,62,62,.15); }
[data-theme="dark"] .ann-form-input,
[data-theme="dark"] .ann-form-textarea { background: var(--bg-input, #2a2a3a); border-color: var(--border-dark, #3a3a4a); color: var(--text-primary); }
[data-theme="dark"] .ann-cover-zone { background: var(--bg-input, #2a2a3a); border-color: var(--border-dark, #3a3a4a); }
[data-theme="dark"] .ann-cover-zone:hover { background: rgba(24,119,242,.12); }
[data-theme="dark"] .ann-priority-pill { background: var(--bg-hover); }
[data-theme="dark"] .ann-form-error { background: rgba(197,48,48,.15); border-color: #e53e3e; color: #fc8181; }
[data-theme="dark"] .ann-card-footer { border-top-color: var(--border-dark, #3a3a4a); }

/* ============================================================
   GROUP ANNOUNCEMENT CARDS
   ============================================================ */
.ws-ann-card {
    padding: 16px;
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    border: 1px solid var(--border-light);
    border-left: 3px solid var(--primary);
    transition: box-shadow .15s;
}
.ws-ann-card:hover { box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,.08)); }
.ws-ann-badges { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.ws-ann-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    line-height: 1.6;
}
.ws-ann-badge--pinned { background: #fef3c7; color: #92400e; }
.ws-ann-author { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ws-ann-author-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.ws-ann-author-name { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.ws-ann-author-time { font-size: 11px; color: var(--text-secondary); }
.ws-ann-title { font-size: 15px; font-weight: 700; margin: 0 0 6px; color: var(--text-primary); }
.ws-ann-content { font-size: 14px; color: var(--text-primary); margin: 0; line-height: 1.6; }
.ws-ann-cover-img { width: 100%; border-radius: var(--radius-sm); margin-top: 12px; max-height: 300px; object-fit: cover; }

[data-theme="dark"] .ws-ann-card { background: var(--bg-card); border-color: var(--border-dark, #3a3a4a); }
[data-theme="dark"] .ws-ann-badge--pinned { background: rgba(254,243,199,.15); color: #fcd34d; }

/* ============================================================
   FEED — ANNOUNCEMENT HIGHLIGHTING
   ============================================================ */

/* Highlighted announcement feed post */
.feed-post.is-announcement {
    border-left: none;
    position: relative;
    overflow: visible;
}

/* Left colored accent bar */
.feed-post-ann-accent {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: var(--priority-color, #1877f2);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    pointer-events: none;
}

/* Strip between accent bar and post header */
.feed-post-ann-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 18px 4px 20px;
    flex-wrap: wrap;
}
.feed-post-ann-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.feed-ann-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-pill, 999px);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em;
}
.feed-ann-badge-pinned {
    background: #fff8e1;
    color: #b45309;
}

/* Pin button inside announcement strip / widget */
.feed-ann-pin-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: var(--radius-pill, 999px);
    border: 1.5px solid var(--border-light);
    background: transparent;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s;
    flex-shrink: 0;
}
.feed-ann-pin-btn:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border); }
.feed-ann-pin-btn.is-pinned { background: #fff8e1; color: #b45309; border-color: #fcd34d; }
.feed-ann-pin-btn:disabled { opacity: .5; cursor: not-allowed; }

/* Indent post-header slightly when accent bar present */
.feed-post.is-announcement .post-header,
.feed-post.is-announcement .post-content,
.feed-post.is-announcement .post-media,
.feed-post.is-announcement .post-stats,
.feed-post.is-announcement .post-actions-bar,
.feed-post.is-announcement .comments-section {
    padding-left: 24px;
}

/* ============================================================
   FEED — ANNOUNCEMENTS WIDGET
   ============================================================ */

#feed-announcements-widget .feed-ann-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 4px 0 8px;
}

/* Individual announcement item */
.feed-ann-item {
    display: flex;
    align-items: stretch;
    position: relative;
    transition: background .12s;
}
.feed-ann-item:not(:last-child) {
    border-bottom: 1px solid var(--border-lighter, var(--border-light));
}
.feed-ann-item:hover { background: var(--bg-hover); }

/* Left colored accent */
.feed-ann-item-accent {
    width: 4px;
    flex-shrink: 0;
    background: var(--priority-color, #1877f2);
    border-radius: 0;
    margin: 4px 0;
}

/* Item body */
.feed-ann-item-body {
    flex: 1;
    padding: 12px 16px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.feed-ann-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.feed-ann-item-badges {
    display: flex;
    align-items: center;
    gap: 5px;
}
.feed-ann-item-icon {
    font-size: 14px;
    line-height: 1;
}
.feed-ann-item-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.feed-ann-item-title:hover { color: var(--primary); text-decoration: underline; }

.feed-ann-item-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--text-muted);
    flex-wrap: wrap;
}
.feed-ann-item-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.feed-ann-item-dot { opacity: .5; }

/* Pin button compact in widget */
#feed-announcements-widget .feed-ann-pin-btn {
    padding: 3px 8px;
    font-size: 11px;
}

/* Pinned item background tint */
.feed-ann-item.is-pinned { background: #fffdf0; }
.feed-ann-item.is-pinned:hover { background: #fff8d6; }

/* ── Dark mode ───────────────────────────────────────────── */
[data-theme="dark"] .feed-post-ann-accent { opacity: .9; }
[data-theme="dark"] .feed-ann-badge-pinned { background: rgba(252,211,77,.15); color: #fcd34d; }
[data-theme="dark"] .feed-ann-pin-btn.is-pinned { background: rgba(252,211,77,.12); color: #fcd34d; border-color: rgba(252,211,77,.4); }
[data-theme="dark"] .feed-ann-item.is-pinned,
[data-theme="dark"] .feed-ann-item.is-pinned:hover { background: rgba(252,211,77,.06); }
[data-theme="dark"] #feed-announcements-widget .feed-ann-list { border-color: var(--border-dark, #3a3a4a); }
[data-theme="dark"] .feed-ann-item:not(:last-child) { border-bottom-color: var(--border-dark, #3a3a4a); }
[data-theme="dark"] .feed-ann-item:hover { background: var(--bg-hover); }

/* ============================================================
   MEMBERS PAGE
   ============================================================ */
.members-page { max-width: 960px; margin: 0 auto; padding: 24px 16px 64px; }

/* Hero */
.members-hero {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; flex-wrap: wrap;
    background: linear-gradient(135deg, #1877f2 0%, #0e5dbe 100%);
    border-radius: var(--radius-sm); padding: 24px 28px; margin-bottom: 20px; color: #fff;
}
.members-hero-left { display: flex; align-items: center; gap: 16px; }
.members-hero-icon { font-size: 38px; line-height: 1; flex-shrink: 0; }
.members-hero-title { font-size: 22px; font-weight: 700; margin: 0 0 4px; color: #fff; }
.members-hero-sub   { font-size: 13px; margin: 0; opacity: .85; color: #fff; }

/* Search */
.members-search-form { flex-shrink: 0; }
.members-search-wrap {
    display: flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,.2); border: 1.5px solid rgba(255,255,255,.4);
    border-radius: var(--radius-pill, 999px); padding: 8px 14px;
    min-width: 220px;
}
.members-search-wrap svg { color: rgba(255,255,255,.8); flex-shrink: 0; }
.members-search-input {
    background: none; border: none; outline: none;
    font-size: 13px; color: #fff; width: 100%;
}
.members-search-input::placeholder { color: rgba(255,255,255,.65); }
.members-search-clear {
    color: rgba(255,255,255,.7); font-size: 18px; line-height: 1;
    text-decoration: none; flex-shrink: 0;
}
.members-search-clear:hover { color: #fff; }

/* Filter bar */
.members-filter-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: var(--bg-white); border: 1px solid var(--border-light);
    border-radius: var(--radius-sm); padding: 8px 16px; margin-bottom: 20px; flex-wrap: wrap;
}
.members-filter-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.members-filter-tab {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 14px; border-radius: var(--radius-pill, 999px);
    font-size: 13px; font-weight: 500; color: var(--text-secondary);
    text-decoration: none; transition: background .15s, color .15s;
}
.members-filter-tab:hover { background: var(--bg-hover); color: var(--text-primary); }
.members-filter-tab.active { background: var(--primary-light, #e8f0fe); color: var(--primary); font-weight: 600; }
.members-total-count { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

/* Grid */
.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

/* Member card */
.member-card {
    background: var(--bg-white); border: 1px solid var(--border-light);
    border-radius: var(--radius-sm); padding: 24px 16px 16px;
    display: flex; flex-direction: column; align-items: center; text-align: center;
    box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s;
}
.member-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.member-card-avatar-link { display: block; margin-bottom: 12px; }
.member-card-avatar {
    width: 80px; height: 80px; border-radius: 50%; object-fit: cover;
    border: 3px solid var(--bg-body);
}
.member-card-name {
    font-size: 15px; font-weight: 700; color: var(--text-primary);
    text-decoration: none; margin-bottom: 4px; line-height: 1.3;
}
.member-card-name:hover { color: var(--primary); }
.member-card-role {
    font-size: 11px; font-weight: 600; color: var(--primary);
    background: var(--primary-light, #e8f0fe); border-radius: var(--radius-pill, 999px);
    padding: 2px 10px; margin-bottom: 8px;
}
.member-card-bio {
    font-size: 12px; color: var(--text-muted); line-height: 1.5;
    margin: 0 0 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.member-card-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: auto; }
.member-conn-btn, .member-msg-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 12px; border-radius: var(--radius-sm);
    font-size: 12px; font-weight: 600; cursor: pointer;
    border: 1.5px solid var(--border-light); transition: background .15s, border-color .15s, color .15s;
}
.member-conn-btn { background: var(--primary); color: #fff; border-color: var(--primary); }
.member-conn-btn:hover:not(:disabled) { background: var(--primary-dark, #1255c0); }
.member-conn-btn.is-connected { background: var(--bg-hover); color: var(--text-secondary); border-color: var(--border-light); cursor: default; }
.member-conn-btn.is-pending   { background: var(--bg-hover); color: var(--text-muted); border-color: var(--border-light); cursor: default; }
.member-msg-btn { background: var(--bg-white); color: var(--text-secondary); }
.member-msg-btn:hover:not(:disabled) { background: var(--bg-hover); color: var(--primary); border-color: var(--primary); }
.member-msg-btn:disabled, .member-conn-btn:disabled { opacity: .7; }

/* Empty & Pagination */
.members-empty { text-align: center; padding: 60px 20px; background: var(--bg-white); border: 1px solid var(--border-light); border-radius: var(--radius-sm); }
.members-empty-icon { font-size: 48px; margin-bottom: 12px; }
.members-empty h3 { font-size: 18px; font-weight: 700; margin: 0 0 8px; }
.members-empty p  { font-size: 14px; color: var(--text-muted); margin: 0; }
.members-pagination { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.members-page-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 600; text-decoration: none;
    color: var(--text-secondary); background: var(--bg-white); border: 1px solid var(--border-light);
    transition: background .15s;
}
.members-page-btn:hover, .members-page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Dark mode */
[data-theme="dark"] .members-filter-bar,
[data-theme="dark"] .member-card { background: var(--bg-card); border-color: var(--border-dark, #3a3a4a); }
[data-theme="dark"] .members-search-wrap { background: rgba(255,255,255,.1); }
[data-theme="dark"] .member-msg-btn { background: var(--bg-card); }

/* ============================================================
   MESSAGES PAGE
   ============================================================ */
.messages-page { padding: 0 !important; max-width: none !important; }
.messages-layout {
    display: flex; height: calc(100vh - 60px);
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin: 16px 0;
}

/* ── Sidebar ── */
.msg-sidebar {
    width: 300px; flex-shrink: 0;
    border-right: 1px solid var(--border-light);
    display: flex; flex-direction: column;
    background: var(--bg-white);
}
.msg-sidebar-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 16px 12px; border-bottom: 1px solid var(--border-light);
}
.msg-sidebar-title { font-size: 18px; font-weight: 800; margin: 0; color: var(--text-primary); }
.msg-new-btn {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--primary-light, #e8f0fe); border: none;
    color: var(--primary); cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background .15s;
}
.msg-new-btn:hover { background: var(--primary); color: #fff; }
.msg-search-wrap {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg-input, #f0f2f5); border-radius: var(--radius-pill, 999px);
    padding: 8px 12px; margin: 8px 12px;
}
.msg-search-wrap svg { color: var(--text-muted); flex-shrink: 0; }
.msg-search-input { background: none; border: none; outline: none; font-size: 13px; color: var(--text-primary); width: 100%; }
.conv-list { overflow-y: auto; flex: 1; }
.conv-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; cursor: pointer; position: relative;
    transition: background .12s;
}
.conv-item:hover { background: var(--bg-hover); }
.conv-item.active { background: var(--primary-light, #e8f0fe); }
.conv-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.conv-info { flex: 1; min-width: 0; }
.conv-item-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-bottom: 2px; }
.conv-name { font-size: 14px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-time { font-size: 11px; color: var(--text-muted); flex-shrink: 0; }
.conv-preview { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unread-badge {
    min-width: 18px; height: 18px; border-radius: var(--radius-pill, 999px);
    background: var(--primary); color: #fff; font-size: 10px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; padding: 0 5px; flex-shrink: 0;
}
.conv-empty { padding: 32px 16px; text-align: center; color: var(--text-muted); font-size: 13px; line-height: 1.6; }
.msg-loading { display: flex; align-items: center; justify-content: center; padding: 32px; }

/* ── Thread ── */
.msg-thread { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.msg-thread-inner { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.msg-empty-state {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center; padding: 40px 20px;
    color: var(--text-secondary);
}
.msg-empty-icon { font-size: 52px; margin-bottom: 16px; }
.msg-empty-state h3 { font-size: 20px; font-weight: 700; margin: 0 0 8px; color: var(--text-primary); }
.msg-empty-state p  { font-size: 14px; text-align: center; max-width: 280px; margin: 0 0 20px; }
.msg-new-btn-cta {
    padding: 10px 24px; border-radius: var(--radius-sm);
    background: var(--primary); color: #fff; border: none;
    font-size: 14px; font-weight: 600; cursor: pointer;
    transition: background .15s;
}
.msg-new-btn-cta:hover { background: var(--primary-dark, #1255c0); }

/* Thread header */
.msg-thread-header {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 18px; border-bottom: 1px solid var(--border-light);
    background: var(--bg-white); flex-shrink: 0;
}
.msg-back-btn {
    display: none; border: none; background: transparent; cursor: pointer;
    color: var(--text-secondary); padding: 4px; border-radius: var(--radius-sm);
    transition: background .15s; flex-shrink: 0;
}
.msg-back-btn:hover { background: var(--bg-hover); }
.msg-thread-avatar-wrap { position: relative; flex-shrink: 0; }
.msg-thread-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; display: block; }
.msg-online-dot {
    position: absolute; bottom: 1px; right: 1px;
    width: 10px; height: 10px; border-radius: 50%;
    background: #22c55e; border: 2px solid var(--bg-white);
}
.msg-thread-info { flex: 1; min-width: 0; }
.msg-thread-name   { font-size: 15px; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-thread-status { font-size: 12px; color: #22c55e; }

/* Messages area */
.messages-area {
    flex: 1; overflow-y: auto; padding: 16px 20px;
    display: flex; flex-direction: column; gap: 10px;
    background: var(--bg-body, #f0f2f5);
}
.msg-day-label { text-align: center; font-size: 12px; color: var(--text-muted); padding: 8px; }
.msg-bubble-wrap {
    display: flex; align-items: flex-end; gap: 8px; max-width: 75%;
}
.msg-bubble-wrap.is-mine  { align-self: flex-end; flex-direction: row-reverse; }
.msg-bubble-wrap.is-theirs { align-self: flex-start; }
.msg-sender-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.msg-bubble-col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.msg-sender-name { font-size: 11px; font-weight: 600; color: var(--text-muted); padding: 0 4px; }
.msg-bubble {
    padding: 8px 14px; border-radius: 18px;
    font-size: 14px; line-height: 1.5; word-break: break-word;
    max-width: 100%;
}
.msg-bubble-wrap.is-mine  .msg-bubble { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.msg-bubble-wrap.is-theirs .msg-bubble { background: var(--bg-white); color: var(--text-primary); border-bottom-left-radius: 4px; box-shadow: var(--shadow-sm); }
.msg-time { font-size: 10px; color: var(--text-muted); padding: 0 4px; align-self: flex-end; }

/* Input bar */
.msg-input-bar {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; border-top: 1px solid var(--border-light);
    background: var(--bg-white); flex-shrink: 0;
}
.msg-input-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.msg-input-wrap {
    flex: 1; display: flex; align-items: center; gap: 8px;
    background: var(--bg-input, #f0f2f5); border-radius: var(--radius-pill, 999px);
    padding: 8px 14px;
}
.msg-input {
    flex: 1; background: none; border: none; outline: none;
    font-size: 14px; font-family: inherit; color: var(--text-primary);
}
.msg-attach-btn { color: var(--text-muted); cursor: pointer; display: flex; transition: color .15s; }
.msg-attach-btn:hover { color: var(--primary); }
.msg-send-btn {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--primary); border: none; color: #fff;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; flex-shrink: 0; transition: background .15s, opacity .15s;
}
.msg-send-btn:hover:not(:disabled) { background: var(--primary-dark, #1255c0); }
.msg-send-btn:disabled { opacity: .45; cursor: default; }

/* ── New message modal ── */
.msg-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 9999;
    display: flex; align-items: flex-start; justify-content: center;
    padding: 60px 16px 16px; backdrop-filter: blur(3px);
}
.msg-modal {
    background: var(--bg-white); border-radius: var(--radius-sm);
    width: 100%; max-width: 480px;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.msg-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--border-light);
}
.msg-modal-title { font-size: 16px; font-weight: 700; margin: 0; }
.msg-modal-close { border: none; background: none; font-size: 22px; cursor: pointer; color: var(--text-muted); line-height: 1; }
.msg-modal-close:hover { color: var(--text-primary); }
.msg-modal-body { padding: 16px 20px; }
.msg-to-wrap {
    display: flex; align-items: center; gap: 8px;
    border: 1.5px solid var(--border-light); border-radius: var(--radius-sm);
    padding: 8px 12px; margin-bottom: 8px;
}
.msg-to-label { font-size: 13px; font-weight: 600; color: var(--text-muted); flex-shrink: 0; }
.msg-to-input { flex: 1; border: none; outline: none; font-size: 14px; background: transparent; color: var(--text-primary); }
.msg-to-results { max-height: 240px; overflow-y: auto; }
.msg-to-result {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 8px; border-radius: var(--radius-sm); cursor: pointer;
    transition: background .12s;
}
.msg-to-result:hover { background: var(--bg-hover); }
.msg-to-result img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.msg-to-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.msg-to-role { font-size: 12px; color: var(--text-muted); }

/* Mobile: hide sidebar when thread is active */
@media (max-width: 680px) {
    .messages-layout { height: calc(100vh - 60px); }
    .msg-sidebar { width: 100%; border-right: none; }
    .msg-thread { display: none; }
    .messages-layout.thread-open .msg-sidebar { display: none; }
    .messages-layout.thread-open .msg-thread { display: flex; width: 100%; }
    .msg-back-btn { display: flex; }
}

/* Dark mode */
[data-theme="dark"] .messages-layout,
[data-theme="dark"] .msg-sidebar,
[data-theme="dark"] .msg-thread-header,
[data-theme="dark"] .msg-input-bar,
[data-theme="dark"] .msg-modal { background: var(--bg-card); border-color: var(--border-dark, #3a3a4a); }
[data-theme="dark"] .msg-sidebar-header,
[data-theme="dark"] .conv-item.active { background: var(--bg-card); }
[data-theme="dark"] .conv-item.active { background: rgba(24,119,242,.15); }
[data-theme="dark"] .messages-area { background: var(--bg-body); }
[data-theme="dark"] .msg-bubble-wrap.is-theirs .msg-bubble { background: var(--bg-card); }
[data-theme="dark"] .msg-search-wrap, [data-theme="dark"] .msg-input-wrap { background: rgba(255,255,255,.06); }
[data-theme="dark"] .msg-online-dot { border-color: var(--bg-card); }
[data-theme="dark"] .msg-to-wrap { border-color: var(--border-dark, #3a3a4a); }
[data-theme="dark"] .msg-modal-header { border-color: var(--border-dark, #3a3a4a); }

/* ============================================================
   USER PROFILE PAGE
   ============================================================ */
.profile-page { display: flex; flex-direction: column; gap: 16px; }

.profile-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
}
.profile-cover {
    height: 220px;
    background: linear-gradient(135deg, var(--ws-blue), var(--primary));
    position: relative;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    overflow: hidden;
}
.profile-cover-edit {
    position: absolute;
    bottom: 12px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,.9);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    backdrop-filter: blur(4px);
}
.profile-cover-edit:hover { background: #fff; }
.profile-info-bar {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    padding: 8px 24px 20px;
    flex-wrap: wrap;
}
.profile-avatar-img {
    width: 108px;
    height: 108px;
    border-radius: 50%;
    border: 4px solid var(--bg-white);
    object-fit: cover;
    margin-top: -44px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    z-index: 1;
}
.profile-info-main { flex: 1; padding-bottom: 4px; min-width: 0; }
.profile-display-name { font-size: 22px; font-weight: 800; margin: 0 0 4px; }
.profile-role-badge {
    display: inline-block;
    background: var(--bg-input);
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    margin-bottom: 4px;
}
.profile-dept {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--text-secondary);
    margin: 4px 0 0;
}
.profile-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding-bottom: 4px; }
.profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: opacity .15s;
}
.profile-btn:hover { opacity: .85; }
.profile-btn-primary   { background: var(--primary); color: #fff; }
.profile-btn-secondary { background: var(--bg-input); color: var(--text-primary); }
.profile-btn-outline   { background: transparent; border: 1.5px solid var(--primary); color: var(--primary); }
.profile-btn-connected { background: #e8f5e9; color: #2e7d32; cursor: default; }
.profile-btn-pending   { background: var(--bg-input); color: var(--text-secondary); cursor: default; }
.profile-stats-bar {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    border-top: 1px solid var(--border-light);
    gap: 0;
}
.profile-stat { display: flex; flex-direction: column; align-items: center; padding: 4px 20px; }
.profile-stat:first-child { padding-left: 0; }
.profile-stat-num { font-size: 22px; font-weight: 800; color: var(--text-primary); line-height: 1.1; }
.profile-stat-label { font-size: 10px; color: var(--text-secondary); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-top: 2px; }
.profile-stat-divider { width: 1px; height: 36px; background: rgba(0,0,0,.12); flex-shrink: 0; }
.profile-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.profile-about-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 20px;
}
.profile-about-title { font-size: 16px; font-weight: 700; margin: 0 0 14px; }
.profile-bio { font-size: 14px; color: var(--text-primary); line-height: 1.55; margin: 0 0 14px; }
.profile-meta-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.profile-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 13.5px;
    color: var(--text-secondary);
}
.profile-meta-item svg { flex-shrink: 0; margin-top: 1px; }
.profile-meta-item a { color: var(--primary); text-decoration: none; word-break: break-all; }
.profile-meta-item a:hover { text-decoration: underline; }
.profile-posts { display: flex; flex-direction: column; gap: 0; }
.profile-no-posts {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 48px 32px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}
.profile-no-posts svg { margin-bottom: 12px; opacity: .4; }
@media (max-width: 768px) {
    .profile-info-bar { flex-direction: column; align-items: flex-start; gap: 12px; }
    .profile-avatar-img { width: 88px; height: 88px; margin-top: -34px; }
    .profile-display-name { font-size: 18px; }
}
[data-theme="dark"] .profile-card,
[data-theme="dark"] .profile-about-card { background: var(--bg-card); border-color: var(--border-dark, #3a3a4a); }
[data-theme="dark"] .profile-avatar-img { border-color: var(--bg-card); }
[data-theme="dark"] .profile-cover-edit { background: rgba(30,30,40,.85); color: #fff; }
[data-theme="dark"] .profile-stats-bar { border-color: var(--border-dark, #3a3a4a); }
[data-theme="dark"] .profile-stat-divider { background: var(--border-dark, #3a3a4a); }
[data-theme="dark"] .profile-role-badge { background: rgba(255,255,255,.08); }
[data-theme="dark"] .profile-btn-secondary { background: rgba(255,255,255,.08); color: #fff; }
[data-theme="dark"] .profile-btn-connected { background: rgba(46,125,50,.2); color: #66bb6a; }
[data-theme="dark"] .profile-no-posts { background: var(--bg-card); border-color: var(--border-dark, #3a3a4a); }

/* ============================================================
   EDIT PROFILE PAGE
   ============================================================ */
.edit-profile-page { display: flex; flex-direction: column; gap: 0; }
.ep-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.ep-hero-left { display: flex; align-items: center; gap: 14px; }
.ep-hero-icon {
    width: 44px; height: 44px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}
.ep-hero-title { font-size: 20px; font-weight: 800; margin: 0 0 2px; }
.ep-hero-sub { font-size: 13px; color: var(--text-secondary); margin: 0; }
.ep-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    transition: background .15s;
}
.ep-back-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.ep-cover-section {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 16px;
}
.ep-cover-preview {
    height: 200px;
    background: linear-gradient(135deg, var(--ws-blue), var(--primary));
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 14px;
}
.ep-cover-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,.9);
    backdrop-filter: blur(4px);
    border-radius: var(--radius-sm);
    padding: 7px 13px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: background .15s;
}
.ep-cover-upload-btn:hover { background: #fff; }
.ep-avatar-section {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px 18px;
}
.ep-avatar-wrap {
    position: relative;
    width: 88px;
    height: 88px;
    margin-top: -44px;
    flex-shrink: 0;
}
.ep-avatar-img {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg-white);
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.ep-avatar-edit-overlay {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(0,0,0,.45);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    opacity: 0;
    transition: opacity .15s;
}
.ep-avatar-wrap:hover .ep-avatar-edit-overlay { opacity: 1; }
.ep-avatar-name { font-size: 14px; }
.ep-avatar-name strong { display: block; font-weight: 700; margin-bottom: 3px; }
.ep-avatar-name span { font-size: 12px; color: var(--primary); }
.ep-form {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 24px;
}
.ep-alert {
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 18px;
}
.ep-alert-success { background: #e8f5e9; color: #2e7d32; }
.ep-alert-error   { background: #fdecea; color: #c62828; }
.ep-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 20px;
}
.ep-field-full { grid-column: 1 / -1; }
.ep-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 6px;
}
.ep-input, .ep-textarea {
    width: 100%;
    background: var(--bg-input);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    font-size: 14px;
    color: var(--text-primary);
    font-family: inherit;
    transition: border-color .15s;
    box-sizing: border-box;
}
.ep-input:focus, .ep-textarea:focus { outline: none; border-color: var(--primary); background: var(--bg-white); }
.ep-textarea { resize: vertical; min-height: 100px; }
.ep-form-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border-light);
}
.ep-save-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .15s;
}
.ep-save-btn:hover { opacity: .88; }
.ep-save-btn:disabled { opacity: .5; cursor: not-allowed; }
.ep-cancel-btn { font-size: 13px; color: var(--text-secondary); text-decoration: none; padding: 10px 14px; }
.ep-cancel-btn:hover { color: var(--text-primary); }
@media (max-width: 600px) {
    .ep-fields-grid { grid-template-columns: 1fr; }
    .ep-field-full { grid-column: 1; }
    .ep-hero { flex-direction: column; align-items: flex-start; }
}
[data-theme="dark"] .ep-cover-section,
[data-theme="dark"] .ep-form { background: var(--bg-card); border-color: var(--border-dark, #3a3a4a); }
[data-theme="dark"] .ep-avatar-img { border-color: var(--bg-card); }
[data-theme="dark"] .ep-input, [data-theme="dark"] .ep-textarea { background: rgba(255,255,255,.06); border-color: var(--border-dark, #3a3a4a); color: #fff; }
[data-theme="dark"] .ep-input:focus, [data-theme="dark"] .ep-textarea:focus { background: rgba(255,255,255,.1); border-color: var(--primary); }
[data-theme="dark"] .ep-form-footer { border-color: var(--border-dark, #3a3a4a); }
[data-theme="dark"] .ep-back-btn { background: rgba(255,255,255,.06); }
[data-theme="dark"] .ep-hero-icon { background: rgba(255,255,255,.06); }

/* ============================================================
   PROJECT MANAGEMENT (Monday.com-style) — Full-width
   ============================================================ */

/* ── Full-width layout override ─────────────────────────────── */
body.page-projects-full .main-content-wrapper { grid-template-columns: 1fr; padding: 0; }
body.page-projects-full #secondary-left,
body.page-projects-full #secondary-right { display: none; }
.ws-pm-fullwidth { padding: 0 24px 40px; max-width: 100%; min-height: calc(100vh - var(--header-height) - 40px); }

/* ── Board List Header ──────────────────────────────────────── */
.ws-pm-list-wrapper { max-width: 1200px; margin: 0 auto; }
.ws-pm-list-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.ws-pm-page-title { margin: 0; font-size: 24px; font-weight: 700; }
.ws-pm-page-subtitle { margin: 4px 0 0; font-size: 13px; color: var(--text-secondary); }

/* ── Workspace Sidebar + Board Grid ─────────────────────────── */
.ws-pm-workspace-layout { display: flex; gap: 24px; }
.ws-pm-workspace-sidebar { width: 220px; flex-shrink: 0; background: var(--bg-white); border-radius: var(--radius-sm); box-shadow: var(--shadow-card); padding: 12px 0; height: fit-content; position: sticky; top: calc(var(--header-height) + 16px); }
.ws-pm-ws-header { display: flex; align-items: center; gap: 8px; padding: 8px 16px; margin-bottom: 4px; }
.ws-pm-ws-icon { width: 24px; height: 24px; border-radius: 6px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; }
.ws-pm-ws-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.ws-pm-ws-item { display: flex; align-items: center; gap: 8px; padding: 8px 16px 8px 24px; font-size: 13px; color: var(--text-primary); text-decoration: none; transition: background .15s; }
.ws-pm-ws-item:hover { background: var(--bg-hover); }
.ws-pm-ws-item-dot { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.ws-pm-ws-add { display: block; width: 100%; text-align: left; padding: 8px 16px 8px 24px; border: none; background: none; font-size: 13px; color: var(--text-muted); cursor: pointer; }
.ws-pm-ws-add:hover { color: var(--primary); background: var(--bg-hover); }
.ws-pm-board-grid-area { flex: 1; }

/* ── Board Cards ────────────────────────────────────────────── */
.ws-pm-board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.ws-pm-empty { text-align: center; padding: 80px 20px; background: var(--bg-white); border-radius: var(--radius-sm); box-shadow: var(--shadow-card); }
.ws-pm-board-card { display: block; background: var(--bg-white); border-radius: var(--radius-sm); box-shadow: var(--shadow-card); overflow: hidden; text-decoration: none; color: inherit; transition: box-shadow .2s, transform .15s; }
.ws-pm-board-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.ws-pm-board-card-accent { height: 4px; background: var(--board-color, var(--primary)); }
.ws-pm-board-card-body { padding: 16px 20px 20px; }
.ws-pm-board-card-title { font-size: 15px; font-weight: 700; color: var(--text-primary); margin: 0 0 4px; }
.ws-pm-board-card-desc { font-size: 13px; color: var(--text-secondary); margin: 0 0 12px; line-height: 1.4; }
.ws-pm-board-card-meta { display: flex; gap: 16px; font-size: 12px; color: var(--text-muted); }

/* ── Buttons ────────────────────────────────────────────────── */
.ws-pm-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; cursor: pointer; border: none; transition: var(--transition); text-decoration: none; white-space: nowrap; }
.ws-pm-btn-primary { background: var(--primary); color: #fff; }
.ws-pm-btn-primary:hover { background: var(--primary-dark); }
.ws-pm-btn-secondary { background: var(--bg-hover); color: var(--text-primary); }
.ws-pm-btn-secondary:hover { background: var(--border); }
.ws-pm-btn-ghost { background: none; color: var(--text-secondary); padding: 6px 12px; }
.ws-pm-btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); }
.ws-pm-btn-danger:hover { color: var(--danger) !important; }
.ws-pm-btn-sm { padding: 6px 12px; font-size: 12px; }

/* ── Modal ──────────────────────────────────────────────────── */
.ws-pm-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; }
.ws-pm-modal-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.5); }
.ws-pm-modal-content { position: relative; background: var(--bg-white); border-radius: var(--radius-sm); width: 100%; max-width: 480px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.ws-pm-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 0; }
.ws-pm-modal-header h3 { margin: 0; font-size: 20px; }
.ws-pm-modal-close { background: none; border: none; font-size: 24px; color: var(--text-secondary); cursor: pointer; padding: 0; line-height: 1; }
.ws-pm-modal-close:hover { color: var(--text-primary); }
.ws-pm-modal-body { padding: 20px 24px; }
.ws-pm-modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--border-light); }
.ws-pm-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px; }
.ws-pm-input { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; background: var(--bg-input); color: var(--text-primary); transition: var(--transition); box-sizing: border-box; }
.ws-pm-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.ws-pm-color-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.ws-pm-color-swatch { width: 28px; height: 28px; border-radius: var(--radius-full); border: 2px solid transparent; cursor: pointer; transition: var(--transition); }
.ws-pm-color-swatch:hover { transform: scale(1.15); }
.ws-pm-color-swatch.active { border-color: var(--text-primary); box-shadow: 0 0 0 2px var(--bg-white); }

/* ── Board Top Bar ──────────────────────────────────────────── */
.ws-pm-topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border-light); margin-bottom: 0; }
.ws-pm-topbar-left { display: flex; align-items: center; gap: 10px; }
.ws-pm-topbar-right { display: flex; align-items: center; gap: 6px; }
.ws-pm-back-btn { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--radius-sm); color: var(--text-secondary); text-decoration: none; transition: var(--transition); }
.ws-pm-back-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.ws-pm-board-title { margin: 0; font-size: 20px; font-weight: 700; }

/* ── View Tabs ──────────────────────────────────────────────── */
.ws-pm-view-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border-light); margin-bottom: 0; }
.ws-pm-view-tab { display: flex; align-items: center; gap: 6px; padding: 10px 16px; border: none; background: none; font-size: 13px; font-weight: 600; color: var(--text-secondary); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: color .15s; }
.ws-pm-view-tab:hover { color: var(--text-primary); }
.ws-pm-view-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ── Toolbar ────────────────────────────────────────────────── */
.ws-pm-toolbar { display: flex; align-items: center; gap: 4px; padding: 10px 0; }
.ws-pm-new-task-btn { border-radius: 4px; padding: 6px 14px; font-size: 13px; }
.ws-pm-toolbar-divider { width: 1px; height: 24px; background: var(--border-light); margin: 0 8px; }
.ws-pm-toolbar-btn { display: flex; align-items: center; gap: 5px; padding: 5px 10px; border: none; background: none; font-size: 13px; color: var(--text-secondary); cursor: pointer; border-radius: 4px; }
.ws-pm-toolbar-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

/* ── Members Panel ──────────────────────────────────────────── */
.ws-pm-members-panel { background: var(--bg-white); border-radius: var(--radius-sm); padding: 16px 20px; margin-bottom: 12px; box-shadow: var(--shadow-card); }
.ws-pm-members-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ws-pm-members-header h4 { margin: 0; font-size: 13px; font-weight: 700; }
.ws-pm-member-add { position: relative; }
.ws-pm-member-results { position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-md); max-height: 200px; overflow-y: auto; z-index: 100; }
.ws-pm-member-result-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 12px; border: none; background: none; cursor: pointer; font-size: 13px; text-align: left; color: var(--text-primary); }
.ws-pm-member-result-item:hover { background: var(--bg-hover); }
.ws-pm-members-list { display: flex; flex-wrap: wrap; gap: 8px; }
.ws-pm-member { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--bg-input); border-radius: var(--radius-full); font-size: 12px; }
.ws-pm-member-avatar { width: 24px; height: 24px; border-radius: var(--radius-full); object-fit: cover; }
.ws-pm-member-name { font-weight: 600; color: var(--text-primary); }
.ws-pm-member-role { color: var(--text-muted); }
.ws-pm-member-remove { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 2px; }
.ws-pm-member-remove:hover { color: var(--danger); }

/* ── Table Groups ───────────────────────────────────────────── */
.ws-pm-table-wrapper { display: flex; flex-direction: column; gap: 28px; }
.ws-pm-group { border-radius: 0; }
.ws-pm-group-header { display: flex; align-items: center; gap: 8px; padding: 8px 0; position: relative; }
.ws-pm-group-toggle { background: none; border: none; color: var(--group-color, var(--text-secondary)); cursor: pointer; padding: 2px; display: flex; align-items: center; transition: transform .2s; }
.ws-pm-group-toggle.collapsed { transform: rotate(-90deg); }
.ws-pm-group-title { font-size: 16px; font-weight: 700; color: var(--group-color); outline: none; min-width: 60px; cursor: text; padding: 2px 4px; border-radius: 4px; }
.ws-pm-group-title:focus { background: var(--bg-hover); }
.ws-pm-group-count { font-size: 12px; color: var(--text-muted); margin-left: 8px; }
.ws-pm-group-delete { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 18px; line-height: 1; opacity: 0; transition: opacity .2s; margin-left: 4px; }
.ws-pm-group-header:hover .ws-pm-group-delete { opacity: 1; }
.ws-pm-group-delete:hover { color: var(--danger); }

/* ── Table Rows ─────────────────────────────────────────────── */
.ws-pm-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--border-light); min-height: 38px; }
.ws-pm-row-header { background: var(--bg-white); font-size: 12px; font-weight: 600; color: var(--text-secondary); border-top: 2px solid var(--group-color, var(--primary)); }
.ws-pm-row-item { background: var(--bg-white); transition: background .1s; cursor: default; }
.ws-pm-row-item:hover { background: rgba(204,229,255,.15); }
.ws-pm-row-add { background: var(--bg-white); border-bottom: none; }
.ws-pm-row-summary { background: var(--bg-white); border-bottom: none; min-height: 32px; }

/* ── Row Color Bar ──────────────────────────────────────────── */
.ws-pm-row-color-bar { width: 6px; align-self: stretch; border-radius: 0; flex-shrink: 0; margin-right: 4px; }

/* ── Table Cells ────────────────────────────────────────────── */
.ws-pm-cell { padding: 0 8px; display: flex; align-items: center; flex-shrink: 0; min-height: 38px; border-right: 1px solid var(--border-light); }
.ws-pm-cell:last-child { border-right: none; }
.ws-pm-cell-checkbox { width: 48px; justify-content: flex-start; gap: 0; border-right: none; padding-left: 0; }
.ws-pm-cell-checkbox input[type="checkbox"] { cursor: pointer; margin-left: 4px; }
.ws-pm-cell-title { flex: 1; min-width: 240px; font-size: 13px; gap: 4px; padding-left: 4px; }
.ws-pm-cell-owner { width: 100px; justify-content: center; }
.ws-pm-cell-status { width: 150px; justify-content: center; padding: 0; }
.ws-pm-cell-priority { width: 50px; justify-content: center; }
.ws-pm-cell-date { width: 130px; justify-content: center; position: relative; }
.ws-pm-cell-plus { width: 36px; justify-content: center; }
.ws-pm-col-add-btn { background: none; border: none; font-size: 16px; color: var(--text-muted); cursor: pointer; padding: 2px 6px; }
.ws-pm-col-add-btn:hover { color: var(--primary); }

/* ── Item Title Cell ────────────────────────────────────────── */
.ws-pm-item-title { outline: none; cursor: text; padding: 4px 6px; border-radius: 4px; font-size: 13px; color: var(--text-primary); flex: 1; }
.ws-pm-item-title:focus { background: var(--bg-input); }
.ws-pm-item-open-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; opacity: 0; transition: opacity .15s; display: flex; align-items: center; flex-shrink: 0; }
.ws-pm-row-item:hover .ws-pm-item-open-btn { opacity: 1; }
.ws-pm-item-open-btn:hover { color: var(--primary); }

/* ── Status Button (full cell fill) ─────────────────────────── */
.ws-pm-status-btn { padding: 0; border: none; border-radius: 0; color: #fff; font-size: 12px; font-weight: 600; cursor: pointer; width: 100%; height: 100%; min-height: 38px; text-align: center; transition: opacity .15s; white-space: nowrap; display: flex; align-items: center; justify-content: center; }
.ws-pm-status-btn:hover { opacity: .85; }

/* ── Priority Button (icon only) ────────────────────────────── */
.ws-pm-priority-btn { background: none; border: none; cursor: pointer; padding: 4px; display: flex; align-items: center; justify-content: center; border-radius: 4px; }
.ws-pm-priority-btn:hover { background: var(--bg-hover); }

/* ── Assignee Button ────────────────────────────────────────── */
.ws-pm-assignee-btn { background: none; border: none; cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center; }
.ws-pm-assignee-avatar { width: 30px; height: 30px; border-radius: var(--radius-full); object-fit: cover; border: 2px solid var(--bg-white); }
.ws-pm-assignee-empty { width: 30px; height: 30px; border-radius: var(--radius-full); border: 2px dashed var(--border); display: flex; align-items: center; justify-content: center; color: var(--text-muted); transition: var(--transition); }
.ws-pm-assignee-btn:hover .ws-pm-assignee-empty { border-color: var(--primary); color: var(--primary); }

/* ── Date Input ─────────────────────────────────────────────── */
.ws-pm-date-input { border: none; background: none; font-size: 12px; color: transparent; padding: 0; cursor: pointer; width: 20px; height: 20px; position: absolute; opacity: 0; }
.ws-pm-date-label { font-size: 13px; color: var(--text-primary); cursor: pointer; }
.ws-pm-cell-date:hover .ws-pm-date-input { opacity: 1; width: 100%; position: relative; color: var(--text-primary); }
.ws-pm-cell-date:hover .ws-pm-date-label { display: none; }
.ws-pm-date-input.ws-pm-overdue ~ .ws-pm-date-label { color: var(--danger); font-weight: 600; }

/* ── Summary Row ────────────────────────────────────────────── */
.ws-pm-summary-bar { display: flex; width: 100%; height: 8px; border-radius: 4px; overflow: hidden; gap: 1px; }
.ws-pm-summary-segment { height: 100%; }
.ws-pm-date-range { font-size: 11px; color: #fff; background: var(--primary); padding: 2px 10px; border-radius: 10px; white-space: nowrap; }

/* ── Add Item Input ─────────────────────────────────────────── */
.ws-pm-add-item-input { border: none; background: none; padding: 8px 6px; font-size: 13px; color: var(--text-secondary); width: 100%; outline: none; font-family: var(--font-body); }
.ws-pm-add-item-input:focus { color: var(--text-primary); }
.ws-pm-add-item-input::placeholder { color: var(--text-muted); }

/* ── Add Group Button ───────────────────────────────────────── */
.ws-pm-add-group-btn { display: flex; align-items: center; gap: 6px; margin-top: 12px; padding: 8px 14px; font-size: 13px; font-weight: 600; color: var(--text-secondary); background: none; border: 1px dashed var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition); }
.ws-pm-add-group-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

/* ── Dropdowns ──────────────────────────────────────────────── */
.ws-pm-dropdown { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-md); min-width: 160px; overflow: hidden; z-index: 9999; }
.ws-pm-dropdown-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 14px; border: none; background: none; cursor: pointer; font-size: 13px; color: var(--text-primary); text-align: left; }
.ws-pm-dropdown-item:hover { background: var(--bg-hover); }
.ws-pm-dropdown-dot { width: 10px; height: 10px; border-radius: var(--radius-full); flex-shrink: 0; }

/* ── Task Detail Side Panel ─────────────────────────────────── */
.ws-pm-task-panel { position: fixed; top: var(--header-height); right: -480px; width: 480px; height: calc(100vh - var(--header-height)); background: var(--bg-white); box-shadow: -4px 0 24px rgba(0,0,0,.12); z-index: 1000; transition: right .3s ease; display: flex; flex-direction: column; overflow: hidden; }
.ws-pm-task-panel.open { right: 0; }
.ws-pm-task-panel-header { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border-light); }
.ws-pm-task-panel-close { background: none; border: none; font-size: 24px; color: var(--text-secondary); cursor: pointer; padding: 0; line-height: 1; }
.ws-pm-task-panel-close:hover { color: var(--text-primary); }
.ws-pm-task-panel-title { margin: 0; font-size: 18px; font-weight: 700; flex: 1; }
.ws-pm-task-panel-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border-light); padding: 0 20px; }
.ws-pm-task-tab { padding: 10px 14px; border: none; background: none; font-size: 13px; font-weight: 600; color: var(--text-secondary); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ws-pm-task-tab:hover { color: var(--text-primary); }
.ws-pm-task-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.ws-pm-task-panel-body { flex: 1; overflow-y: auto; padding: 20px; }
.ws-pm-task-tab-content { display: none; }
.ws-pm-task-tab-content.active { display: block; }
.ws-pm-task-notes-input { margin-bottom: 20px; }
.ws-pm-task-notes-input textarea { margin-bottom: 8px; min-height: 60px; resize: vertical; }
.ws-pm-task-empty-state { text-align: center; padding: 40px 16px; }
.ws-pm-task-empty-state p { margin: 8px 0 0; font-size: 13px; }
.ws-pm-task-notes-display .ws-pm-note-item { padding: 12px; background: var(--bg-input); border-radius: var(--radius-sm); margin-bottom: 8px; font-size: 13px; white-space: pre-wrap; }

/* ── Dashboard ──────────────────────────────────────────────── */
.ws-pm-view { /* views toggle */ }
.ws-pm-dash-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.ws-pm-dash-card { background: var(--bg-white); border-radius: var(--radius-sm); box-shadow: var(--shadow-card); padding: 20px; text-align: center; border: 1px solid var(--border-light); }
.ws-pm-dash-card-header { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.ws-pm-dash-card-value { font-size: 36px; font-weight: 700; color: var(--text-primary); }
.ws-pm-dash-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.ws-pm-dash-widget { background: var(--bg-white); border-radius: var(--radius-sm); box-shadow: var(--shadow-card); border: 1px solid var(--border-light); overflow: hidden; }
.ws-pm-dash-widget-header { padding: 14px 20px; border-bottom: 1px solid var(--border-light); }
.ws-pm-dash-widget-header h4 { margin: 0; font-size: 14px; font-weight: 700; }
.ws-pm-dash-widget-body { padding: 20px; min-height: 200px; display: flex; align-items: center; justify-content: center; }

/* Pie Chart */
.ws-pm-dash-pie-wrapper { display: flex; align-items: center; gap: 24px; width: 100%; }
.ws-pm-dash-pie { width: 160px; height: 160px; border-radius: 50%; flex-shrink: 0; }
.ws-pm-dash-legend { display: flex; flex-direction: column; gap: 8px; }
.ws-pm-legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-secondary); }
.ws-pm-legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* Bar Chart (vertical) */
.ws-pm-dash-bars { display: flex; gap: 24px; align-items: flex-end; justify-content: center; width: 100%; height: 180px; }
.ws-pm-dash-bar-group { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; max-width: 80px; }
.ws-pm-dash-bar-label { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.ws-pm-dash-bar-track { width: 100%; height: 120px; background: var(--bg-input); border-radius: 4px 4px 0 0; position: relative; display: flex; align-items: flex-end; }
.ws-pm-dash-bar-fill { width: 100%; background: var(--primary); border-radius: 4px 4px 0 0; transition: height .5s ease; min-height: 4px; }
.ws-pm-dash-bar-name { font-size: 11px; color: var(--text-muted); text-align: center; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Horizontal bar */
.ws-pm-dash-bars-h { flex-direction: column; height: auto; align-items: stretch; gap: 10px; }
.ws-pm-dash-hbar { display: flex; align-items: center; gap: 8px; }
.ws-pm-dash-hbar-label { width: 70px; font-size: 12px; font-weight: 600; color: var(--text-secondary); text-align: right; flex-shrink: 0; }
.ws-pm-dash-hbar-track { flex: 1; height: 20px; background: var(--bg-input); border-radius: 4px; overflow: hidden; }
.ws-pm-dash-hbar-fill { height: 100%; border-radius: 4px; transition: width .5s ease; min-width: 4px; }
.ws-pm-dash-hbar-val { width: 24px; font-size: 13px; font-weight: 700; color: var(--text-primary); }
.ws-pm-dash-big-number { font-size: 48px; font-weight: 700; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .ws-pm-workspace-sidebar { display: none; }
    .ws-pm-task-panel { width: 380px; }
}
@media (max-width: 900px) {
    .ws-pm-cell-priority { display: none; }
    .ws-pm-cell-status { width: 120px; }
    .ws-pm-dash-cards { grid-template-columns: repeat(2, 1fr); }
    .ws-pm-dash-charts { grid-template-columns: 1fr; }
    .ws-pm-task-panel { width: 100%; right: -100%; }
}
@media (max-width: 600px) {
    .ws-pm-fullwidth { padding: 0 12px 24px; }
    .ws-pm-board-grid { grid-template-columns: 1fr; }
    .ws-pm-cell-owner,
    .ws-pm-cell-date { display: none; }
    .ws-pm-cell-title { min-width: 140px; }
    .ws-pm-topbar { flex-direction: column; align-items: flex-start; gap: 8px; }
    .ws-pm-toolbar { flex-wrap: wrap; }
    .ws-pm-dash-cards { grid-template-columns: 1fr 1fr; }
}

/* ── Dark Mode ──────────────────────────────────────────────── */
[data-theme="dark"] .ws-pm-board-card,
[data-theme="dark"] .ws-pm-members-panel,
[data-theme="dark"] .ws-pm-empty,
[data-theme="dark"] .ws-pm-workspace-sidebar,
[data-theme="dark"] .ws-pm-dash-card,
[data-theme="dark"] .ws-pm-dash-widget { background: var(--bg-card); border-color: var(--border-dark, #3a3a4a); }
[data-theme="dark"] .ws-pm-modal-content,
[data-theme="dark"] .ws-pm-task-panel { background: var(--bg-card); }
[data-theme="dark"] .ws-pm-row-header { background: rgba(255,255,255,.03); }
[data-theme="dark"] .ws-pm-row-item { background: var(--bg-card); }
[data-theme="dark"] .ws-pm-row-item:hover { background: rgba(255,255,255,.04); }
[data-theme="dark"] .ws-pm-row-add,
[data-theme="dark"] .ws-pm-row-summary { background: var(--bg-card); }
[data-theme="dark"] .ws-pm-dropdown { background: var(--bg-card); border-color: var(--border-dark, #3a3a4a); }
[data-theme="dark"] .ws-pm-dropdown-item:hover,
[data-theme="dark"] .ws-pm-member-result-item:hover { background: rgba(255,255,255,.06); }
[data-theme="dark"] .ws-pm-input { background: rgba(255,255,255,.06); border-color: var(--border-dark, #3a3a4a); color: #fff; }
[data-theme="dark"] .ws-pm-member { background: rgba(255,255,255,.06); }
[data-theme="dark"] .ws-pm-assignee-avatar { border-color: var(--bg-card); }

/* ================================================================
   PHOTO LIGHTBOX — per-photo reactions & comments
   ================================================================ */

.ws-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: stretch;
    justify-content: center;
}
.ws-lightbox.is-open {
    display: flex;
}
/* Lock page scroll while lightbox is open */
html.ws-lightbox-open,
html.ws-lightbox-open body {
    overflow: hidden !important;
}
.ws-lightbox-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .85);
    z-index: 1;
}
.ws-lightbox-container {
    position: relative;
    z-index: 2;
    display: flex;
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
}

/* Close button */
.ws-lightbox-close {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.ws-lightbox-close:hover { background: rgba(255, 255, 255, .3); }

/* ── Image area ─────────────────────────────────────────────── */
.ws-lightbox-media {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #000;
    min-width: 0;
}
.ws-lightbox-img-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 40px 60px;
}
#ws-lightbox-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    user-select: none;
}
.ws-lightbox-counter {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, .7);
    font-size: 13px;
    font-weight: 500;
    background: rgba(0, 0, 0, .5);
    padding: 4px 14px;
    border-radius: 20px;
}

/* Navigation arrows */
.ws-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, opacity .2s;
}
.ws-lightbox-nav:hover { background: rgba(255, 255, 255, .3); }
.ws-lightbox-nav.is-hidden { opacity: 0; pointer-events: none; }
.ws-lightbox-prev { left: 16px; }
.ws-lightbox-next { right: 16px; }

/* ── Sidebar ────────────────────────────────────────────────── */
.ws-lightbox-sidebar {
    width: 360px;
    min-width: 360px;
    background: var(--bg-white);
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border-light);
}

/* Header */
.ws-lightbox-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
}
.ws-lightbox-author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}
.ws-lightbox-author-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

/* Reaction stats */
.ws-lightbox-reactions-stats {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    min-height: 36px;
}
.ws-lightbox-reaction-icons {
    display: flex;
}
.ws-lightbox-reaction-icons span {
    font-size: 16px;
    margin-right: -4px;
}
.ws-lightbox-reaction-total {
    font-size: 13px;
    color: var(--text-secondary);
    margin-left: 6px;
}

/* Action buttons */
.ws-lightbox-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px 10px;
    border-bottom: 1px solid var(--border-light);
}
.ws-lightbox-react-wrapper {
    position: relative;
}
.ws-lightbox-like-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: none;
    border-radius: var(--radius-sm);
    background: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.ws-lightbox-like-btn:hover { background: var(--bg-hover); }
.ws-lightbox-like-btn.liked { color: var(--primary); }
.ws-lightbox-like-btn.liked svg { fill: currentColor; }
.ws-lightbox-comment-count {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Reaction popup */
#ws-lightbox .ws-lightbox-reaction-popup {
    position: absolute;
    bottom: 100%;
    left: 0;
    display: none;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: var(--bg-white);
    border-radius: 30px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    z-index: 20;
    margin-bottom: 8px;
    white-space: nowrap;
}
/* Invisible bridge so the mouse can travel from the Like button to the popup */
#ws-lightbox .ws-lightbox-reaction-popup::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 8px;
}
#ws-lightbox .ws-lightbox-reaction-popup.is-visible {
    display: flex;
}
#ws-lightbox .ws-lb-react-btn {
    font-size: 28px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    transition: transform .15s, background .15s;
    line-height: 40px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
#ws-lightbox .ws-lb-react-btn:hover {
    transform: scale(1.3);
    background: var(--bg-hover);
}

/* Comments list */
.ws-lightbox-comments {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
}
.ws-lightbox-comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ws-lightbox-loading {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    padding: 20px 0;
}

/* Individual comment in lightbox */
.ws-lb-comment {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}
.ws-lb-comment-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.ws-lb-comment-body {
    flex: 1;
    min-width: 0;
}
.ws-lb-comment-bubble {
    background: var(--bg-input);
    border-radius: 12px;
    padding: 8px 12px;
}
.ws-lb-comment-author {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    display: block;
    margin-bottom: 2px;
}
.ws-lb-comment-author:hover { text-decoration: underline; }
.ws-lb-comment-bubble p {
    margin: 0;
    font-size: 13px;
    color: var(--text-primary);
    word-break: break-word;
}
.ws-lb-comment-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    padding-left: 4px;
}

/* No comments state */
.ws-lb-no-comments {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    padding: 30px 0;
}

/* Comment input */
.ws-lightbox-comment-input {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border-light);
}
.ws-lightbox-comment-input > img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.ws-lb-comment-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border-radius: 20px;
    padding: 0 4px 0 14px;
}
.ws-lb-comment-field {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font-size: 13px;
    padding: 8px 0;
    color: var(--text-primary);
    font-family: inherit;
}
.ws-lb-comment-field::placeholder { color: var(--text-muted); }
.ws-lb-comment-send {
    border: none;
    background: none;
    color: var(--primary);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: .4;
    transition: opacity .2s;
}
.ws-lb-comment-send:not(:disabled) { opacity: 1; }
.ws-lb-comment-send:not(:disabled):hover { background: var(--bg-hover); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 800px) {
    .ws-lightbox-container { flex-direction: column; }
    .ws-lightbox-media { flex: none; height: 50vh; }
    .ws-lightbox-sidebar { width: 100%; min-width: 0; flex: 1; }
    .ws-lightbox-img-wrap { padding: 20px; }
}

/* ── Dark mode ──────────────────────────────────────────────── */
[data-theme="dark"] .ws-lightbox-sidebar { background: var(--bg-card); }
[data-theme="dark"] .ws-lightbox-header { border-color: var(--border-dark, #3a3a4a); }
[data-theme="dark"] .ws-lightbox-actions { border-color: var(--border-dark, #3a3a4a); }
[data-theme="dark"] .ws-lightbox-comment-input { border-color: var(--border-dark, #3a3a4a); }
[data-theme="dark"] .ws-lightbox-reaction-popup { background: var(--bg-card); border-color: var(--border-dark, #3a3a4a); }
[data-theme="dark"] .ws-lb-comment-bubble { background: rgba(255, 255, 255, .06); }
[data-theme="dark"] .ws-lb-comment-input-wrap { background: rgba(255, 255, 255, .06); }
[data-theme="dark"] .ws-lb-comment-field { color: #fff; }
