/* ============================================
   NUST NAVIGATOR — MAIN STYLESHEET
   Sections:
   1. Reset & Variables
   2. Base & Typography
   3. Navbar
   4. Flash Messages
   5. Auth Pages (Login/Register)
   6. Page Layout
   7. Search Bar
   8. Photo Grid & Modal
   9. Profile
   10. Upload
   11. Home Feed
   12. Societies & Podium
   13. Events
   14. Admin Panel
   15. Shared Utilities
   16. Mobile Responsive
   17. Campus Map
============================================ */


/* ============================================
   1. RESET & VARIABLES
============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --green-dark: #1a3a2a;
    --green-mid: #2d6a4f;
    --green-light: #40916c;
    --green-accent: #52b788;
    --white: #ffffff;
    --off-white: #f8f9fa;
    --grey-light: #e9ecef;
    --grey-mid: #6c757d;
    --grey-dark: #343a40;
    --shadow: 0 8px 32px rgba(0,0,0,0.2);
    --radius: 12px;
    /* Theme tokens */
    --bg: #f8f9fa;
    --surface: #ffffff;
    --text-primary: #343a40;
    --text-secondary: #6c757d;
    --border: #dee2e6;
    --tint-green: #f0f7f4;
    --tint-red: #fff0f0;
    --chip-grey: #f3f4f6;
    --input-bg: #ffffff;
}

/* Dark theme — green brand colors (--green-*) are untouched on purpose.
   Only neutral/white/grey tokens are swapped so the green identity holds. */
body[data-theme="dark"] {
    --bg: #14141f;
    --surface: #1c1c2c;
    --surface-2: #242438;
    --text-primary: #e8e8ea;
    --text-secondary: #9ca3af;
    --border: #34344a;
    --off-white: #242438;
    --grey-light: #34344a;
    --grey-mid: #9ca3af;
    --grey-dark: #e8e8ea;
    --tint-green: #16261e;
    --tint-red: #2e1a1a;
    --chip-grey: #2a2a3d;
    --input-bg: #11111c;
    background-color: var(--bg) !important;
    color: var(--text-primary);
}

/* Card / panel surfaces — these were plain white in light mode */
body[data-theme="dark"] .feed-card,
body[data-theme="dark"] .modal-card,
body[data-theme="dark"] .user-card,
body[data-theme="dark"] .settings-card,
body[data-theme="dark"] .settings-group,
body[data-theme="dark"] .settings-logout-btn,
body[data-theme="dark"] .settings-back-btn,
body[data-theme="dark"] .profile-header,
body[data-theme="dark"] .upload-form,
body[data-theme="dark"] .loc-post-modal-card,
body[data-theme="dark"] .child-cafe-card,
body[data-theme="dark"] .venue-panel-toggle,
body[data-theme="dark"] .venue-chip,
body[data-theme="dark"] .sidebar-card,
body[data-theme="dark"] .create-post-box,
body[data-theme="dark"] .society-card,
body[data-theme="dark"] .event-card,
body[data-theme="dark"] .admin-stat-card,
body[data-theme="dark"] .admin-table,
body[data-theme="dark"] .admin-post-card,
body[data-theme="dark"] .follow-btn.following,
body[data-theme="dark"] .society-profile-card,
body[data-theme="dark"] .society-profile-logo,
body[data-theme="dark"] .announcements-board,
body[data-theme="dark"] .notif-item {
    background: var(--surface) !important;
    color: var(--text-primary);
    border-color: var(--border);
}

/* Inputs — distinct shade from cards so field boundaries stay visible */
body[data-theme="dark"] .search-input-wrapper input,
body[data-theme="dark"] .input-wrapper-light input,
body[data-theme="dark"] .input-wrapper-light select,
body[data-theme="dark"] .input-wrapper-light textarea,
body[data-theme="dark"] .comment-form input,
body[data-theme="dark"] .feed-comment-input,
body[data-theme="dark"] .settings-input-group input {
    background: var(--input-bg) !important;
    color: var(--text-primary);
    border-color: var(--border);
}
body[data-theme="dark"] .search-input-wrapper input::placeholder,
body[data-theme="dark"] .input-wrapper-light input::placeholder,
body[data-theme="dark"] .input-wrapper-light textarea::placeholder,
body[data-theme="dark"] .comment-form input::placeholder,
body[data-theme="dark"] .feed-comment-input::placeholder,
body[data-theme="dark"] .settings-input-group input::placeholder {
    color: var(--text-secondary);
}

/* Theme picker preview boxes need a visible ring in dark mode */
body[data-theme="dark"] .light-preview {
    border: 1px solid var(--border);
}

body[data-theme="dark"] .page-container {
    background: var(--bg);
}

/* Flash messages, dividers and section borders stay clearly visible */
body[data-theme="dark"] hr,
body[data-theme="dark"] .feed-comments,
body[data-theme="dark"] .comment-form {
    border-color: var(--border) !important;
}

/* Comment text used the dark brand green (--green-dark), which is nearly
   black and unreadable against dark surfaces. Bump these up to a brighter
   green in dark mode for contrast, without touching the light theme. */
body[data-theme="dark"] .comment-bubble strong,
body[data-theme="dark"] .view-replies-btn,
body[data-theme="dark"] .replying-to span,
body[data-theme="dark"] .hashtag-link,
body[data-theme="dark"] .mention-link {
    color: var(--green-accent) !important;
}

body[data-theme="dark"] .view-replies-btn:hover,
body[data-theme="dark"] .hashtag-link:hover,
body[data-theme="dark"] .mention-link:hover {
    color: var(--green-light) !important;
}

/* Same low-contrast issue on other green-on-dark text: page heading
   gradients (NUST Societies, Admin Dashboard, etc.), the ANNOUNCEMENT
   badge, admin section headings, admin table usernames, and notification
   sender tags. Brighten the stops/colors in dark mode only — the
   gradient shape on .page-title is kept, just shifted lighter. */
body[data-theme="dark"] .page-title {
    background-image: linear-gradient(135deg, var(--green-light), var(--green-accent)) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

body[data-theme="dark"] .announcement-banner,
body[data-theme="dark"] .admin-actions h3,
body[data-theme="dark"] .admin-section h3,
body[data-theme="dark"] .table-username,
body[data-theme="dark"] .notif-sender,
body[data-theme="dark"] .stat-number,
body[data-theme="dark"] .board-title {
    color: var(--green-accent) !important;
}


/* ============================================
   2. BASE & TYPOGRAPHY
============================================ */
body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--off-white);
    color: var(--grey-dark);
}

.page-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--green-dark), var(--green-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.3rem;
}

.page-subtitle {
    color: var(--grey-mid);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.section-label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--grey-mid);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}


/* ============================================
   3. NAVBAR
============================================ */
.navbar {
    background: var(--green-dark);
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--white);
    font-size: 1.2rem;
    letter-spacing: 0.5px;
}

.nav-brand span {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.nav-logo {
    height: 40px;
    width: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--green-accent);
}

.nav-center {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-tab {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 8px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.2px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.nav-tab:hover {
    color: white;
    background: rgba(255,255,255,0.1);
}

.nav-tab.active {
    color: white;
    background: var(--green-mid);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.nav-icon-btn {
    color: rgba(255,255,255,0.8);
    font-size: 1.3rem;
    text-decoration: none;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

.nav-icon-btn:hover {
    color: var(--green-accent);
}

.nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--green-accent);
}

.nav-upload-btn {
    background: var(--green-accent);
    color: white !important;
    padding: 7px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.nav-upload-btn:hover {
    background: var(--green-mid) !important;
}

.btn-outline {
    color: white;
    border: 1px solid rgba(255,255,255,0.4);
    padding: 7px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-outline:hover {
    border-color: white;
    background: rgba(255,255,255,0.1);
}

.btn-primary-small {
    background: var(--green-mid);
    color: white;
    padding: 7px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-primary-small:hover {
    background: var(--green-light);
}

.admin-link {
    color: #ffd166 !important;
}


/* ============================================
   4. FLASH MESSAGES
============================================ */
.flash-messages {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.flash {
    padding: 12px 20px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow);
    animation: slideIn 0.3s ease;
}

.flash.success { background: var(--green-mid); color: white; }
.flash.error   { background: #e63946; color: white; }
.flash.info    { background: #457b9d; color: white; }

@keyframes slideIn {
    from { transform: translateX(100px); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}


/* ============================================
   5. AUTH PAGES (Login / Register)
============================================ */
.auth-page {
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.auth-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 30, 20, 0.6);
    backdrop-filter: blur(2px);
}

.auth-card {
    position: relative;
    z-index: 1;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.4);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    margin-bottom: 1rem;
    object-fit: cover;
}

.auth-header h1 {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--white);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 0.3rem;
}

.auth-header p {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    color: rgba(255,255,255,0.8);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 14px;
    color: rgba(255,255,255,0.4);
    font-size: 0.9rem;
}

.input-wrapper input,
.input-wrapper select {
    width: 100%;
    padding: 12px 14px 12px 40px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    color: var(--white);
    font-size: 0.95rem;
    font-family: 'Outfit', sans-serif;
    transition: border 0.2s, background 0.2s;
    appearance: none;
    -webkit-appearance: none;
}

.input-wrapper select option {
    background: var(--green-dark);
    color: var(--white);
}

.input-wrapper input::placeholder {
    color: rgba(255,255,255,0.3);
}

.input-wrapper input:focus,
.input-wrapper select:focus {
    outline: none;
    border-color: var(--green-accent);
    background: rgba(255,255,255,0.15);
}

.forgot-password-link {
    text-align: right;
    margin-top: 0.5rem;
}

.forgot-password-link a {
    color: rgba(255,255,255,0.6);
    font-size: 0.8rem;
    text-decoration: none;
}

.forgot-password-link a:hover {
    color: var(--green-accent);
    text-decoration: underline;
}

.btn-primary {
    width: 100%;
    padding: 13px;
    background: var(--green-mid);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    transition: background 0.2s, transform 0.1s;
    margin-top: 0.5rem;
}

.btn-primary:hover {
    background: var(--green-light);
    transform: translateY(-1px);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-footer p {
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
}

.auth-footer a {
    color: var(--green-accent);
    text-decoration: none;
    font-weight: 500;
}

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

.guest-link {
    padding-top: 4px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.auth-help-links {
    padding-top: 4px;
    font-size: 0.78rem !important;
}


/* ============================================
   6. PAGE LAYOUT
============================================ */
.page-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--green-mid);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.back-btn:hover {
    color: var(--green-dark);
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--grey-mid);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--grey-light);
    display: block;
}

.empty-state h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--grey-dark);
}

.empty-state p {
    font-size: 0.9rem;
}


/* ============================================
   7. SEARCH BAR
============================================ */
.search-bar-wrapper {
    margin-bottom: 2rem;
}

.search-form {
    display: flex;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.search-input-wrapper i {
    position: absolute;
    left: 14px;
    color: var(--grey-mid);
}

.search-input-wrapper input {
    width: 100%;
    padding: 11px 14px 11px 40px;
    border: 1.5px solid var(--grey-light);
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: 'Outfit', sans-serif;
    background: white;
    transition: border 0.2s;
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: var(--green-mid);
}

.search-btn {
    background: var(--green-mid);
    color: white;
    border: none;
    padding: 11px 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    transition: background 0.2s;
}

.search-btn:hover {
    background: var(--green-light);
}

.user-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 500px;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: white;
    border-radius: 12px;
    text-decoration: none;
    border: 1.5px solid var(--grey-light);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.user-card:hover {
    border-color: var(--green-mid);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.user-card-avatar {
    font-size: 2.2rem;
    color: var(--grey-mid);
}
.search-loc-icon {
    color: var(--green-light, #52b788);
}

.user-card-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-card-name {
    font-weight: 600;
    color: var(--grey-dark);
}

.user-card-type {
    font-size: 0.8rem;
    color: var(--grey-mid);
    background: var(--grey-light);
    padding: 2px 8px;
    border-radius: 10px;
}


/* ============================================
   8. PHOTO GRID & MODAL
============================================ */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.grid-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    cursor: pointer;
    background: var(--grey-light);
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.grid-item:hover img {
    transform: scale(1.05);
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    opacity: 0;
    transition: opacity 0.2s;
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.grid-item:hover .grid-overlay {
    opacity: 1;
}

.delete-form {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s;
}

.grid-item:hover .delete-form {
    opacity: 1;
}

.delete-btn {
    background: rgba(230, 57, 70, 0.85);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: background 0.2s;
}

.delete-btn:hover {
    background: #e63946;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image-side {
    flex: 1;
    background: black;
    display: flex;
    align-items: center;
}

.modal-image-side img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-height: 90vh;
}

.modal-info-side {
    width: 320px;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--grey-light);
}

.modal-user {
    font-weight: 700;
    color: var(--grey-dark);
    text-decoration: none;
    font-size: 0.95rem;
}

.modal-user:hover {
    color: var(--green-mid);
}

.modal-caption {
    font-size: 0.9rem;
    color: var(--grey-dark);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.modal-actions {
    margin-bottom: 1rem;
}

.like-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--grey-dark);
    font-size: 0.95rem;
    font-family: 'Outfit', sans-serif;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
    transition: color 0.2s;
}

.like-btn:hover { color: #e63946; }
.like-btn i { font-size: 1.1rem; }

.modal-comments {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comment {
    font-size: 0.85rem;
    color: var(--grey-dark);
    line-height: 1.4;
}

.comment strong {
    color: var(--green-dark);
}

.comment-form {
    display: flex;
    gap: 8px;
    border-top: 1px solid var(--grey-light);
    padding-top: 1rem;
}

.comment-form input {
    flex: 1;
    padding: 8px 12px;
    border: 1.5px solid var(--grey-light);
    border-radius: 20px;
    font-size: 0.85rem;
    font-family: 'Outfit', sans-serif;
    outline: none;
    transition: border 0.2s;
}

.comment-form input:focus {
    border-color: var(--green-mid);
}

.comment-form button {
    background: var(--green-mid);
    color: white;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.comment-form button:hover {
    background: var(--green-light);
}


/* ============================================
   9. PROFILE
============================================ */
.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 2rem;
    background: white;
    border-radius: 16px;
    border: 1.5px solid var(--grey-light);
}

.profile-avatar {
    position: relative;
    display: inline-block;
    font-size: 5rem;
    color: var(--grey-mid);
}

.avatar-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--green-accent);
}

.edit-avatar-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--green-mid);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    text-decoration: none;
    border: 2px solid white;
    transition: background 0.2s;
}

.edit-avatar-btn:hover {
    background: var(--green-dark);
}

.profile-username-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.3rem;
}

.profile-username-row h2 {
    font-size: 1.4rem;
    color: var(--grey-dark);
}

.profile-type {
    color: var(--grey-mid);
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.profile-email {
    color: var(--grey-mid);
    font-size: 0.85rem;
}

.profile-stats {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--green-dark);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--grey-mid);
}

/* Edit profile / avatar upload */
.current-avatar {
    text-align: center;
    margin-bottom: 1rem;
}

.current-avatar p {
    color: var(--grey-mid);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.avatar-placeholder {
    font-size: 5rem;
    color: var(--grey-mid);
}

.avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--green-accent);
}


/* ============================================
   10. UPLOAD
============================================ */
.upload-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.upload-form {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    border: 1.5px solid var(--grey-light);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.upload-drop-zone {
    border: 2px dashed var(--grey-light);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    background: var(--off-white);
}

.upload-drop-zone:hover {
    border-color: var(--green-mid);
    background: var(--tint-green);
}

.upload-drop-zone.drag-over {
    border-color: var(--green-accent);
    background: #e8f5f0;
}

.upload-drop-zone input[type="file"] {
    display: none;
}

.drop-zone-content i {
    font-size: 3rem;
    color: var(--green-accent);
    margin-bottom: 1rem;
    display: block;
}

.drop-zone-content h3 {
    font-size: 1.1rem;
    color: var(--grey-dark);
    margin-bottom: 0.3rem;
}

.drop-zone-content p {
    color: var(--grey-mid);
    font-size: 0.9rem;
}

.file-types {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--grey-mid);
    background: var(--grey-light);
    padding: 3px 10px;
    border-radius: 10px;
}

.image-preview {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
}

/* Multi-photo selection preview grid (upload.html / create_event.html) */
.preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.preview-thumb {
    position: relative;
    width: 110px;
    height: 110px;
    border-radius: 10px;
    overflow: hidden;
    border: 1.5px solid var(--grey-light);
    flex-shrink: 0;
}

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

.preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.65);
    color: white;
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-remove:hover {
    background: #e63946;
}

.preview-count {
    width: 100%;
    text-align: center;
    font-size: 0.85rem;
    color: var(--grey-mid);
    margin-top: 4px;
}

/* Crop button on review thumbnails */
.thumb-crop-btn {
    position: absolute;
    bottom: 4px;
    left: 4px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.65);
    color: white;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.thumb-crop-btn:hover { background: #2d6a4f; }

/* Large thumbnails for review mode */
.preview-thumb-lg {
    width: 160px;
    height: 160px;
    border-radius: 12px;
    border: 2px solid var(--green-accent);
}

/* Review panel */
.review-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.review-panel-count {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--grey-mid);
}
.review-panel-actions {
    display: flex;
    gap: 8px;
}
.review-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid var(--green-accent);
    background: none;
    color: var(--green-dark);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
}
.review-action-btn:hover { background: var(--tint-green); }
.review-action-clear {
    border-color: #e5e7eb;
    color: #888;
}
.review-action-clear:hover { background: #fef2f2; border-color: #e63946; color: #e63946; }
body[data-theme="dark"] .review-action-btn { color: var(--green-accent); border-color: var(--green-accent); }
body[data-theme="dark"] .review-action-btn:hover { background: #1a3a2a; }
body[data-theme="dark"] .review-action-clear { border-color: #34344a; color: #888; }
body[data-theme="dark"] .review-action-clear:hover { background: #2a1616; border-color: #e63946; color: #e63946; }
body[data-theme="dark"] .preview-thumb-lg { border-color: var(--green-accent); }

/* ============================================
   IMAGE CAROUSEL (multi-image posts)
============================================ */
.post-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

.carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
}

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

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    z-index: 5;
    transition: background 0.2s;
}

.carousel-arrow:hover {
    background: rgba(0, 0, 0, 0.75);
}

.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }

.carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
    z-index: 5;
}

.carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
}

.carousel-dot.active {
    background: white;
    width: 8px;
    height: 8px;
}

.carousel-counter {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.55);
    color: white;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 10px;
    z-index: 5;
}

/* modal-image-side / loc-post-modal-img-wrap stretch the carousel via
   width/height: 100% already set on .post-carousel; image-side specific
   object-fit rules below apply to the carousel's own slide images too. */
.modal-image-side .carousel-slide img {
    object-fit: contain;
}

/* .post-carousel needs a definite height wherever its parent's height is
   auto (feed cards, location modal) so percentage heights inside it resolve.
   Use aspect-ratio instead of a flat pixel height so the crop stays
   consistent at any card width (mobile cards are much narrower than
   desktop ones, so a fixed px height made mobile crops look wrong/distorted
   compared to desktop).
   Note: in home.html the feed card carousel root has BOTH classes on the
   SAME element (<div class="feed-image post-carousel">), not nested — so
   this must be a compound selector (no space), or it silently never
   matches and each slide falls back to sizing off its own image's
   intrinsic ratio (causing per-slide height jumps / gaps below shorter
   slides, which is what was actually happening here). */
.feed-image.post-carousel {
    aspect-ratio: 1 / 1;
    height: auto;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

.loc-post-modal-img-wrap .post-carousel {
    height: auto;
    aspect-ratio: 1 / 1;
}

.caption-input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--grey-light);
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: 'Outfit', sans-serif;
    resize: none;
    transition: border 0.2s;
    color: var(--grey-dark);
}

.caption-input:focus {
    outline: none;
    border-color: var(--green-mid);
}

.char-count {
    display: block;
    text-align: right;
    font-size: 0.8rem;
    color: var(--grey-mid);
    margin-top: 4px;
}

.optional {
    color: var(--grey-mid);
    font-size: 0.8rem;
    font-weight: 400;
}

.input-wrapper-light input,
.input-wrapper-light select,
.input-wrapper-light textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--grey-light);
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: 'Outfit', sans-serif;
    color: var(--grey-dark);
    background: white;
    transition: border 0.2s;
    resize: vertical;
}

.input-wrapper-light input:focus,
.input-wrapper-light select:focus,
.input-wrapper-light textarea:focus {
    outline: none;
    border-color: var(--green-mid);
}

/* Announcement feed card */
.feed-card-announcement {
    border-left: 3px solid var(--green-mid);
}
.feed-card-event {
    border-left: 3px solid #7c3aed;
}
.event-banner {
    background: rgba(124,58,237,0.1) !important;
    color: #7c3aed !important;
}
.announcement-banner {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(45,106,79,0.12);
    color: var(--green-dark);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
}

/* Location page post modal */
.loc-post-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.loc-post-modal-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    position: relative;
}
.loc-post-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: rgba(0,0,0,0.4);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}
.loc-post-modal-img-wrap {
    width: 100%;
    max-height: 340px;
    overflow: hidden;
    flex-shrink: 0;
}
.loc-post-modal-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.loc-post-modal-info {
    padding: 16px;
    overflow-y: auto;
}
.loc-post-modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.loc-modal-avatar-link { text-decoration: none; }
.loc-modal-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--grey-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--grey-mid);
    flex-shrink: 0;
}
.loc-modal-avatar img { width: 100%; height: 100%; object-fit: cover; }
.loc-modal-username {
    font-weight: 700;
    color: var(--grey-dark);
    text-decoration: none;
    font-size: 0.9rem;
    display: block;
}
.loc-modal-username:hover { color: var(--green-mid); }
.loc-modal-date { font-size: 0.78rem; color: var(--grey-mid); }
.loc-modal-caption {
    font-size: 0.92rem;
    color: var(--grey-dark);
    line-height: 1.55;
    margin-bottom: 12px;
    white-space: pre-wrap;
}
.loc-modal-stats {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--grey-mid);
}
.loc-modal-stats i { margin-right: 4px; }

/* Child cafe cards on concordia page */
.child-cafes-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.child-cafe-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: white;
    border: 1.5px solid var(--grey-light);
    border-radius: 14px;
    padding: 16px 20px;
    text-decoration: none;
    transition: box-shadow 0.2s, border-color 0.2s;
    min-width: 110px;
}
.child-cafe-card:hover {
    border-color: #a04a00;
    box-shadow: 0 4px 14px rgba(160,74,0,0.1);
}
.child-cafe-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5c2800, #a04a00);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}
.child-cafe-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--grey-dark);
}
.child-cafe-sub {
    font-size: 0.75rem;
    color: var(--grey-mid);
    text-align: center;
}

/* Fix: label text on white upload form */
.upload-form .form-group label {
    color: #343a40;
}
.upload-drop-zone {
    color: #343a40;
}
.upload-drop-zone p {
    color: #6c757d;
}

/* Venue panel (announcement form) */
.venue-panel {
    border: 1.5px solid var(--grey-light);
    border-radius: 10px;
    overflow: hidden;
}

.venue-panel-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    background: white;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-family: 'Outfit', sans-serif;
    color: var(--grey-dark);
    text-align: left;
    transition: background 0.15s;
}
.venue-panel-toggle:hover { background: var(--off-white); }
.venue-panel-toggle .fa-map-marker-alt { color: var(--green-mid); }
.venue-panel-toggle #venuePanelLabel { flex: 1; }
.venue-panel-toggle #venuePanelChevron { font-size: 0.8rem; color: var(--grey-mid); transition: transform 0.2s; }

.venue-panel-body {
    border-top: 1.5px solid var(--grey-light);
    padding: 12px 14px;
    background: var(--off-white);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.venue-group-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--grey-mid);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 7px;
}
.venue-group-label i { margin-right: 5px; color: var(--green-mid); }

.venue-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.venue-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: white;
    border: 1.5px solid var(--grey-light);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    user-select: none;
    color: #343a40;
}
.venue-chip span { color: #343a40; }
.venue-chip input[type="checkbox"] { display: none; }
.venue-chip:hover { border-color: var(--green-mid); }
.venue-chip:has(input:checked) {
    background: rgba(45,106,79,0.1);
    border-color: var(--green-mid);
    color: var(--green-dark);
    font-weight: 600;
}

.venue-hint {
    font-size: 0.78rem;
    color: var(--green-mid);
    margin-top: 6px;
}

/* ============================================
   11. HOME FEED
============================================ */
.home-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.feed-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-card {
    background: white;
    border-radius: 14px;
    padding: 1.2rem;
    border: 1.5px solid var(--grey-light);
    position: sticky;
    top: 80px;
}

.sidebar-card h4 {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--green-dark);
    margin-bottom: 0.5rem;
}

.sidebar-card p {
    font-size: 0.85rem;
    color: var(--grey-mid);
    line-height: 1.5;
}

/* Guest welcome card */
/* Welcome overlay (first-login popup) */
.welcome-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.welcome-card {
    background: var(--bg-card, #fff);
    border-radius: 20px;
    padding: 2rem 2rem 1.6rem;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
}
.welcome-logo { margin-bottom: 1rem; }
.welcome-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    color: var(--green-dark, #2d6a4f);
    margin: 0 0 0.5rem;
}
.welcome-sub {
    color: var(--text-muted, #6c757d);
    font-size: 0.9rem;
    margin: 0 0 1.4rem;
    line-height: 1.5;
}
.welcome-features {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    text-align: left;
    margin-bottom: 1.6rem;
}
.welcome-feature {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
}
.welcome-feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(45,106,79,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--green-dark, #2d6a4f);
    flex-shrink: 0;
    font-size: 1rem;
}
.welcome-feature strong { display: block; font-size: 0.9rem; color: var(--text-primary, #222); }
.welcome-feature span { font-size: 0.82rem; color: var(--text-muted, #6c757d); }
.welcome-continue-btn {
    background: var(--green-dark, #2d6a4f);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 0.75rem 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s;
}
.welcome-continue-btn:hover { background: var(--green-mid, #1b4332); }

.guest-welcome-card {
    position: relative;
    background: linear-gradient(135deg, var(--green-dark), var(--green-mid));
    color: white;
    border-radius: 14px;
    padding: 1.4rem 1.4rem 1.2rem;
}
.guest-welcome-dismiss {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: background 0.2s;
}
.guest-welcome-dismiss:hover { background: rgba(255,255,255,0.3); }
.guest-welcome-inner {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.guest-welcome-emoji { font-size: 1.8rem; line-height: 1; flex-shrink: 0; }
.guest-welcome-inner h3 {
    margin: 0 0 6px;
    font-size: 1.15rem;
    font-family: 'Space Grotesk', sans-serif;
    color: white;
}
.guest-welcome-inner p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.5;
    opacity: 0.95;
    color: white;
}
.guest-welcome-cta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.guest-cta-btn {
    background: white;
    color: var(--green-dark);
    padding: 9px 20px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
}
.guest-cta-btn:hover { background: #f0faf5; transform: translateY(-1px); }
.guest-cta-link {
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: underline;
    opacity: 0.9;
}
.guest-cta-link:hover { opacity: 1; }

/* Create post box */
.create-post-box {
    background: white;
    border-radius: 14px;
    border: 1.5px solid var(--grey-light);
    padding: 1.2rem;
}

.create-post-top {
    display: flex;
    gap: 1rem;
}

.create-avatar {
    font-size: 2.2rem;
    color: var(--grey-mid);
    flex-shrink: 0;
}

.create-avatar img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
}

.create-post-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.post-textarea {
    width: 100%;
    border: none;
    outline: none;
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    resize: none;
    color: var(--grey-dark);
    min-height: 80px;
    background: transparent;
}

.post-textarea::placeholder {
    color: var(--grey-mid);
}

.post-preview {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
}

.post-preview img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 10px;
}

.remove-image {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.create-post-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--grey-light);
    padding-top: 0.8rem;
}

.attach-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--green-mid);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: background 0.2s;
}

.attach-btn:hover {
    background: var(--tint-green);
}

.post-submit-btn {
    background: var(--green-mid);
    color: white;
    border: none;
    padding: 8px 22px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    transition: background 0.2s;
}

.post-submit-btn:hover {
    background: var(--green-light);
}

/* Feed cards */
.feed-card {
    background: white;
    border-radius: 14px;
    border: 1.5px solid var(--grey-light);
    padding: 1.2rem;
    transition: box-shadow 0.2s;
}

.feed-card:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.feed-card-header {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.feed-avatar {
    font-size: 2.2rem;
    color: var(--grey-mid);
    text-decoration: none;
    flex-shrink: 0;
}

.feed-avatar img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
}

.feed-card-meta {
    flex: 1;
}

.feed-username-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.feed-username {
    font-weight: 700;
    color: var(--grey-dark);
    text-decoration: none;
    font-size: 0.95rem;
}

.feed-username:hover {
    color: var(--green-mid);
}

.feed-date {
    font-size: 0.78rem;
    color: var(--grey-mid);
}

.feed-delete-form {
    margin-left: auto;
}

.feed-delete-btn {
    background: none;
    border: none;
    color: var(--grey-mid);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.feed-delete-btn:hover {
    background: var(--tint-red);
    color: #e63946;
}

.feed-caption {
    font-size: 0.95rem;
    color: var(--grey-dark);
    line-height: 1.6;
    margin-bottom: 0.8rem;
    white-space: pre-wrap;
}

.feed-image {
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.8rem;
}

.feed-image img {
    width: 100%;
    max-height: 600px;
    object-fit: contain;
    background: #000;
    display: block;
}

.feed-actions {
    display: flex;
    gap: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--grey-light);
}

.feed-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--grey-mid);
    font-size: 0.9rem;
    font-family: 'Outfit', sans-serif;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.feed-action-btn:hover {
    background: var(--tint-green);
    color: var(--green-mid);
}

/* Reactions */
.reaction-wrapper {
    position: relative;
}

.reaction-trigger-btn.has-reacted {
    color: var(--green-mid);
}

.reaction-picker {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    display: none;
    align-items: center;
    gap: 4px;
    background: var(--surface, #fff);
    border: 1px solid var(--border, var(--grey-light));
    border-radius: 24px;
    padding: 6px 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
    z-index: 20;
    white-space: nowrap;
}

.reaction-picker.open {
    display: flex;
}

.reaction-emoji-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    padding: 4px 6px;
    border-radius: 50%;
    transition: transform 0.15s, background 0.15s;
}

.reaction-emoji-btn:hover {
    background: var(--tint-green);
    transform: scale(1.25);
}

.reaction-bubbles {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 0.6rem;
}

.reaction-bubble {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--chip-grey, var(--grey-light));
    color: var(--text-secondary, var(--grey-dark));
    border: 1px solid var(--border, transparent);
    border-radius: 14px;
    padding: 2px 9px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.reaction-bubble:hover {
    border-color: var(--green-mid);
}

.reaction-bubble.mine {
    background: var(--tint-green);
    border-color: var(--green-mid);
    color: var(--green-mid);
}

/* Hashtags */
.hashtag-link {
    color: var(--green-mid);
    font-weight: 600;
    text-decoration: none;
}

.hashtag-link:hover {
    text-decoration: underline;
}

.feed-comments {
    margin-top: 0.8rem;
    border-top: 1px solid var(--grey-light);
    padding-top: 0.8rem;
}

.feed-comment {
    font-size: 0.85rem;
    color: var(--grey-dark);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.feed-comment strong {
    color: var(--green-dark);
}

.comment-input-row {
    display: flex;
    gap: 8px;
    margin-top: 0.8rem;
}

.feed-comment-input {
    flex: 1;
    padding: 8px 12px;
    border: 1.5px solid var(--grey-light);
    border-radius: 20px;
    font-size: 0.85rem;
    font-family: 'Outfit', sans-serif;
    outline: none;
    transition: border 0.2s;
}

.feed-comment-input:focus {
    border-color: var(--green-mid);
}

.comment-send-btn {
    background: var(--green-mid);
    color: white;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.comment-send-btn:hover {
    background: var(--green-light);
}


/* ============================================
   12. SOCIETIES & PODIUM
============================================ */
.podium-section {
    margin-bottom: 3rem;
}

.podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 1rem;
    padding: 2rem 0 0;
}

.podium-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
    max-width: 180px;
}

.podium-crown {
    color: #ffd166;
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.podium-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--grey-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--grey-mid);
    overflow: hidden;
    border: 3px solid var(--grey-light);
}

.podium-avatar.large {
    width: 90px;
    height: 90px;
    border-color: #ffd166;
    font-size: 2.2rem;
}

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

.podium-rank {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--grey-mid);
    font-family: 'Space Grotesk', sans-serif;
}

.podium-rank.gold {
    color: #ffd166;
    font-size: 1.5rem;
}

.podium-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--grey-dark);
    text-align: center;
    text-decoration: none;
}

.podium-name:hover {
    color: var(--green-mid);
}

.podium-score {
    font-size: 0.8rem;
    color: var(--grey-mid);
    display: flex;
    align-items: center;
    gap: 4px;
}

.podium-score i {
    color: #ffd166;
}

.podium-block {
    width: 100%;
    border-radius: 8px 8px 0 0;
    margin-top: 8px;
}

.first-block  { height: 80px; background: linear-gradient(135deg, #ffd166, #f4a127); }
.second-block { height: 60px; background: linear-gradient(135deg, #b0b8c1, #8d99ae); }
.third-block  { height: 40px; background: linear-gradient(135deg, #cd7f32, #a05c20); }

/* Society cards */
.societies-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.society-card {
    background: white;
    border-radius: 14px;
    border: 1.5px solid var(--grey-light);
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.society-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--green-mid);
    border-radius: 4px 0 0 4px;
}

.society-card:hover {
    border-color: var(--green-mid);
    box-shadow: 0 4px 20px rgba(45,106,79,0.1);
    transform: translateX(4px);
}

.society-card-rank {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--grey-light);
    font-family: 'Space Grotesk', sans-serif;
    min-width: 30px;
}

.society-card-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--grey-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--grey-mid);
    overflow: hidden;
    flex-shrink: 0;
}

.society-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.society-card-info {
    flex: 1;
}

.society-card-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--grey-dark);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.society-card-category {
    font-size: 0.75rem;
    background: #d8f3dc;
    color: var(--green-mid);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 6px;
}

.society-card-desc {
    font-size: 0.82rem;
    color: var(--grey-mid);
    line-height: 1.4;
}

.society-card-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.score-number {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--green-dark);
    font-family: 'Space Grotesk', sans-serif;
}

.score-label {
    font-size: 0.7rem;
    color: var(--grey-mid);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.activity-badge {
    background: #e63946;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
    margin-left: auto;
}


/* ============================================
   13. EVENTS
============================================ */
.create-event-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--green-mid);
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    transition: background 0.2s;
}

.create-event-btn:hover {
    background: var(--green-light);
}

.events-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 680px;
    margin: 0 auto;
}

/* Event cards — location pages */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.event-card {
    background: white;
    border-radius: 14px;
    border: 1.5px solid var(--grey-light);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.15s;
    display: flex;
    flex-direction: column;
}

.event-card:hover {
    box-shadow: 0 4px 18px rgba(0,0,0,0.09);
    transform: translateY(-1px);
}

/* Thumbnail — constrained height, full width */
.event-thumb {
    width: 100%;
    height: 160px;
    overflow: hidden;
    flex-shrink: 0;
}

.event-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-info {
    padding: 14px 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.event-header-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

/* Date badge */
.event-date-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--green-dark);
    color: white;
    border-radius: 10px;
    padding: 6px 10px;
    min-width: 44px;
    flex-shrink: 0;
}

.event-date-day {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
}

.event-date-mon {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.85;
}

.event-title-block {
    flex: 1;
    min-width: 0;
}

.event-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--grey-dark);
    line-height: 1.3;
    margin-bottom: 3px;
}

.event-meta {
    font-size: 0.8rem;
    color: var(--grey-mid);
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.event-countdown {
    color: var(--green-mid);
    font-weight: 600;
}

.event-body {
    font-size: 0.88rem;
    color: var(--grey-mid);
    line-height: 1.5;
    margin: 0;
}

.event-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--grey-light);
    flex-wrap: wrap;
}

.event-interest-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--off-white);
    border: 1.5px solid var(--grey-light);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--grey-mid);
    cursor: pointer;
    transition: all 0.15s;
}

.event-interest-btn.active {
    background: rgba(45,106,79,0.1);
    border-color: var(--green-mid);
    color: var(--green-dark);
}

.event-interest-btn i { font-size: 0.75rem; }

.event-int-count {
    background: var(--grey-light);
    border-radius: 10px;
    padding: 1px 6px;
    font-size: 0.75rem;
}

.event-interest-count {
    font-size: 0.82rem;
    color: var(--grey-mid);
}

.event-by {
    font-size: 0.8rem;
    color: var(--grey-mid);
    text-decoration: none;
    margin-left: auto;
}

.event-by:hover { color: var(--green-mid); }

.event-delete-btn {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    padding: 4px;
    font-size: 0.8rem;
    transition: color 0.15s;
}

.event-delete-btn:hover { color: #e63946; }

.event-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--tint-green);
    color: var(--green-mid);
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    transition: background 0.2s;
}

.event-link-btn:hover { background: #d8f3dc; }


/* ============================================
   14. ADMIN PANEL
============================================ */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.admin-stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1.5px solid var(--grey-light);
}

.admin-stat-card i {
    font-size: 2rem;
    color: var(--green-mid);
}

.admin-actions {
    margin-bottom: 2rem;
}

.admin-actions h3,
.admin-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--green-dark);
    margin-bottom: 1rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.action-btn {
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s;
}

.action-btn:hover  { opacity: 0.85; }
.action-btn.green  { background: var(--green-mid); color: white; }
.action-btn.blue   { background: #457b9d; color: white; }
.action-btn.red    { background: #e63946; color: white; }

.admin-section {
    margin-bottom: 2rem;
}

.admin-table {
    background: white;
    border-radius: 12px;
    border: 1.5px solid var(--grey-light);
    overflow: hidden;
}

.admin-table-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 12px 16px;
    border-bottom: 1px solid var(--grey-light);
    flex-wrap: wrap;
}

.admin-table-row:last-child {
    border-bottom: none;
}

.table-username {
    font-weight: 600;
    color: var(--green-dark);
    min-width: 140px;
}

.table-email {
    color: var(--grey-mid);
    font-size: 0.85rem;
    flex: 1;
}

.table-type {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 10px;
    text-transform: capitalize;
}

.table-type.student { background: #d8f3dc; color: #2d6a4f; }
.table-type.society { background: #caf0f8; color: #0077b6; }

.admin-badge {
    color: #ffd166;
    font-size: 0.85rem;
    font-weight: 600;
}

.admin-posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.admin-post-card {
    border-radius: 10px;
    overflow: hidden;
    border: 1.5px solid var(--grey-light);
    background: white;
}

.admin-post-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.admin-post-info {
    padding: 8px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--grey-mid);
}


/* ============================================
   15. SHARED UTILITIES
============================================ */
.blue-tick {
    color: #1da1f2;
    font-size: 1rem;
}


/* ============================================
   16. MOBILE RESPONSIVE
============================================ */
@media (max-width: 768px) {

    /* Navbar */
    .navbar {
        padding: 0 0.75rem;
        height: auto;
        flex-wrap: wrap;
    }

    .nav-container {
        flex-wrap: wrap;
        padding: 5px 0;
        gap: 4px;
    }

    .nav-brand span {
        font-size: 0.9rem;
    }

    .nav-logo {
        height: 28px;
        width: 28px;
    }

    .nav-center {
        order: 3;
        width: 100%;
        justify-content: center;
        border-top: 1px solid rgba(255,255,255,0.1);
        padding-top: 4px;
        gap: 4px;
    }

    .nav-right {
        gap: 0.4rem;
        display: flex;
        align-items: center;
    }

    .nav-icon-btn {
        font-size: 1.1rem;
    }

    .nav-avatar {
        width: 26px;
        height: 26px;
    }

    .btn-outline,
    .btn-primary-small {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    .user-card-info {
        flex-wrap: wrap;
        gap: 4px;
    }

    .user-card-name {
        width: 100%;
    }

    /* Auth */
    .auth-card {
        margin: 1rem;
        padding: 1.8rem;
    }

    .auth-logo {
        width: 60px;
        height: 60px;
    }

    .auth-header h1 {
        font-size: 1.3rem;
    }

    /* Page */
    .page-container {
        padding: 1rem;
    }

    .page-title {
        font-size: 1.4rem;
        -webkit-text-fill-color: unset;
        color: var(--green-dark);
    }

    /* Photo grid */
    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 3px;
    }

    /* Location page: 3 columns on mobile */
    .loc-photo-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3px;
    }

    /* Modal */
    .modal-card {
        flex-direction: column;
        max-height: 95vh;
        border-radius: 12px;
        overflow-y: auto;
    }

    .modal-info-side {
        width: 100%;
        max-height: none;
        padding: 1rem;
    }

    .modal-image-side {
        max-height: 55vh;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }

    .modal-image-side img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        max-height: 55vh;
    }

    /* Multi-image carousel inside the post modal needs an explicit height on
       mobile too — height:100% on a div (unlike an img) can't fall back to
       intrinsic sizing, so without this it collapses against the indefinite
       height of .modal-image-side. */
    .modal-image-side .post-carousel {
        height: 55vh;
        max-height: 55vh;
        width: 100%;
    }

    .modal-info-side {
        width: 100%;
        max-height: 45vh;
    }

    /* Search */
    .search-form {
        flex-direction: column;
    }

    .search-btn {
        width: 100%;
    }

    /* Profile */
    .profile-header {
        flex-direction: row;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.2rem;
    }

    .profile-avatar {
        flex-shrink: 0;
    }

    .avatar-img {
        width: 76px;
        height: 76px;
    }

    .profile-info {
        flex: 1;
        min-width: 0;
    }

    .profile-username-row h2 {
        font-size: 1.05rem;
    }

    .profile-stats {
        gap: 1.2rem;
        margin-top: 0.7rem;
    }

    .stat-number {
        font-size: 1rem;
    }

    /* Upload */
    .upload-drop-zone {
        padding: 2rem 1rem;
    }

    .upload-form {
        padding: 1.5rem;
    }

    /* Home feed */
    .home-layout {
        grid-template-columns: 1fr;
    }

    .sidebar-column {
        display: none;
    }

    /* Societies */
    .podium {
        gap: 0.5rem;
    }

    .podium-avatar {
        width: 55px;
        height: 55px;
    }

    .podium-avatar.large {
        width: 70px;
        height: 70px;
    }

    .society-card-desc {
        display: none;
    }

    /* Admin */
    .admin-stats {
        grid-template-columns: 1fr;
    }

    .admin-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .action-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .nav-tab {
        font-size: 0;
        padding: 8px 10px;
    }

    .nav-tab i {
        font-size: 16px;
        display: block;
    }

    .nav-upload-btn {
        font-size: 0;
        padding: 8px 10px;
    }

    .nav-upload-btn i {
        font-size: 16px;
    }

    .auth-card {
        padding: 1.4rem;
    }
}
/* FOLLOW BUTTON */
.follow-btn {
    margin-top: 1rem;
    padding: 9px 24px;
    background: var(--green-mid);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.follow-btn:hover {
    background: var(--green-light);
}

.follow-btn.following {
    background: white;
    color: var(--green-mid);
    border: 1.5px solid var(--green-mid);
}

.follow-btn.following:hover {
    background: var(--tint-red);
    color: #e63946;
    border-color: #e63946;
}
/* FOLLOWERS / FOLLOWING */
.stat-link {
    text-decoration: none;
    transition: opacity 0.2s;
}

.stat-link:hover {
    opacity: 0.7;
}

.stat-link .stat-number {
    color: var(--green-dark);
}

.stat-link .stat-label {
    color: var(--grey-mid);
}

.mutuals-preview {
    margin-top: 0.6rem;
    font-size: 0.85rem;
    color: var(--grey-mid);
    display: flex;
    align-items: center;
    gap: 6px;
}

.mutuals-preview i {
    color: var(--green-accent);
}

.mutual-badge {
    background: #d8f3dc;
    color: var(--green-mid);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.avatar-img-small {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--green-accent);
}
/* SOCIETY PROFILE */
.society-profile-card {
    background: white;
    border-radius: 16px;
    border: 1.5px solid var(--grey-light);
    overflow: hidden;
    margin-bottom: 2rem;
}

.society-cover {
    height: 160px;
    background: linear-gradient(135deg, var(--green-dark), var(--green-mid));
    background-size: cover;
    background-position: center;
    position: relative;
}

.cover-upload-form {
    position: absolute;
    top: 12px;
    right: 12px;
}

.cover-upload-btn {
    background: rgba(0,0,0,0.4);
    color: white;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255,255,255,0.3);
    transition: background 0.2s;
}

.cover-upload-btn:hover {
    background: rgba(0,0,0,0.6);
}

.society-profile-header {
    padding: 0 1.5rem 1.5rem;
}

.society-profile-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: -28px;
    margin-bottom: 1rem;
    padding-top: 0;
}

.society-profile-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding-top: 36px;
}

.society-profile-logo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: white;
    border: 3px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--grey-mid);
    overflow: hidden;
    position: relative;
}

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

.society-profile-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 4px;
}

.announce-btn {
    background: var(--green-dark);
    color: white;
    padding: 8px 14px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.2s;
    white-space: nowrap;
}

.announce-btn:hover {
    background: var(--green-mid);
}

.society-profile-info {
    margin-bottom: 1rem;
}

.society-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.society-name-row h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--grey-dark);
}

.society-handle {
    font-size: 0.85rem;
    color: var(--grey-mid);
    display: block;
    margin-bottom: 0.6rem;
}

.society-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.6rem;
}

.society-score-inline {
    font-size: 0.82rem;
    color: var(--grey-mid);
    display: flex;
    align-items: center;
    gap: 4px;
}

.society-score-inline i {
    color: #ffd166;
}

.society-profile-desc {
    font-size: 0.9rem;
    color: var(--grey-dark);
    line-height: 1.6;
}

/* ANNOUNCEMENTS BOARD */
.announcements-board {
    background: white;
    border-radius: 14px;
    border: 1.5px solid var(--grey-light);
    padding: 1.2rem 1.5rem;
    margin-bottom: 2rem;
}

.board-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.announcements-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.announcement-item {
    padding: 1rem;
    background: var(--off-white);
    border-radius: 10px;
    border-left: 4px solid var(--green-accent);
    position: relative;
}

.announcement-body {
    font-size: 0.9rem;
    color: var(--grey-dark);
    line-height: 1.6;
    margin-bottom: 0.5rem;
    white-space: pre-wrap;
}

.announcement-date {
    font-size: 0.75rem;
    color: var(--grey-mid);
    display: block;
    margin-top: 0.5rem;
}

/* PINNED POST */
.pinned-section {
    margin-bottom: 1.5rem;
}

.pinned-post {
    position: relative;
    max-width: 300px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid var(--green-accent);
}

.pinned-post img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    transition: transform 0.3s;
}

.pinned-post:hover img {
    transform: scale(1.05);
}

.pinned-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    color: white;
    font-weight: 600;
}

.pinned-post:hover .pinned-overlay {
    opacity: 1;
}

/* PIN BUTTON */
.grid-post-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s;
    display: flex;
    gap: 4px;
}

.grid-item:hover .grid-post-actions {
    opacity: 1;
}

.pin-btn {
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: background 0.2s;
}

.pin-btn.pinned {
    background: var(--green-accent);
}

.pin-btn:hover {
    background: var(--green-mid);
}

/* MOBILE */
@media (max-width: 768px) {
    .society-cover {
        height: 120px;
    }

    .society-profile-top {
        margin-top: -28px;
    }

    .society-profile-logo {
        width: 56px;
        height: 56px;
        font-size: 1.4rem;
    }

    .pinned-post {
        max-width: 100%;
    }

    .society-profile-actions {
        flex-wrap: wrap;
        gap: 6px;
    }

    .announce-btn {
        font-size: 0.78rem;
        padding: 7px 11px;
    }
}
/* ANNOUNCEMENT META */
.announcement-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.5rem;
}

.ann-delete-btn {
    background: none;
    border: none;
    color: #e63946;
    font-size: 0.78rem;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.ann-delete-btn:hover {
    background: var(--tint-red);
}
/* EDIT PROFILE */
.edit-avatar-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1.5px solid var(--grey-light);
}

.edit-avatar-preview {
    flex-shrink: 0;
}

.avatar-placeholder-small {
    font-size: 4rem;
    color: var(--grey-mid);
}

.edit-avatar-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.change-photo-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--green-mid);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.change-photo-btn:hover {
    background: var(--green-light);
}

.remove-photo-btn {
    background: none;
    border: 1.5px solid #e63946;
    color: #e63946;
    padding: 7px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.remove-photo-btn:hover {
    background: var(--tint-red);
}

.input-hint {
    font-size: 0.78rem;
    color: var(--grey-mid);
    margin-top: 4px;
    display: block;
}

.society-edit-note {
    background: var(--tint-green);
    border: 1.5px solid var(--green-accent);
    border-radius: 10px;
    padding: 1rem;
    font-size: 0.85rem;
    color: var(--green-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}
/* NOTIFICATIONS */
.notif-btn {
    position: relative;
}

.notif-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #e63946;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--green-dark);
}

.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 600px;
}

.notif-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    border: 1.5px solid var(--grey-light);
    text-decoration: none;
    transition: all 0.2s;
}

.notif-item:hover {
    border-color: var(--green-mid);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.notif-item.unread {
    background: var(--tint-green);
    border-color: var(--green-accent);
}

.notif-avatar {
    font-size: 2.2rem;
    color: var(--grey-mid);
    flex-shrink: 0;
}

.notif-avatar img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.notif-content {
    flex: 1;
    font-size: 0.9rem;
    color: var(--grey-dark);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.notif-sender {
    font-weight: 700;
    color: var(--green-dark);
}

.notif-text {
    color: var(--grey-dark);
}

.notif-icon {
    font-size: 0.85rem;
    margin-left: 4px;
}

.notif-icon.like     { color: #e63946; }
.notif-icon.comment  { color: var(--green-mid); }
.notif-icon.follow   { color: #457b9d; }
.notif-icon.announce { color: #ffd166; }

.notif-date {
    width: 100%;
    font-size: 0.75rem;
    color: var(--grey-mid);
    margin-top: 2px;
}

.notif-post-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.notif-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* ADMIN TEXT POST */
.admin-text-post {
    width: 100%;
    aspect-ratio: 1;
    background: var(--off-white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    gap: 0.5rem;
}

.admin-text-post i {
    font-size: 1.5rem;
    color: var(--green-accent);
}

.admin-text-post p {
    font-size: 0.75rem;
    color: var(--grey-mid);
    text-align: center;
    line-height: 1.4;
}
/* LIKED STATE */

.like-btn-feed .fa-heart {
    transition: color 0.2s, transform 0.2s;
}

/* MENTIONS */
.mention-link {
    color: var(--green-mid);
    font-weight: 600;
    text-decoration: none;
}

.mention-link:hover {
    text-decoration: underline;
}

.notif-icon.mention {
    color: var(--green-accent);
}
/* INSTAGRAM STYLE COMMENTS */
.comment-thread {
    margin-bottom: 0.8rem;
}

.feed-comment {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.feed-comment.reply {
    margin-left: 2rem;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    font-size: 1.8rem;
    color: var(--grey-mid);
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment-avatar.small {
    width: 24px;
    height: 24px;
    font-size: 1.4rem;
}

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

.comment-content {
    flex: 1;
}

.comment-bubble {
    background: var(--off-white);
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: var(--grey-dark);
    line-height: 1.4;
    display: inline-block;
    max-width: 100%;
}

.comment-bubble strong {
    color: var(--green-dark);
    margin-right: 4px;
}

.reply-btn {
    background: none;
    border: none;
    color: var(--grey-mid);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    padding: 2px 4px;
    margin-top: 2px;
    transition: color 0.2s;
}

.reply-btn:hover {
    color: var(--green-mid);
}

.comment-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--grey-mid);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    padding: 2px 4px;
    margin-top: 2px;
    transition: color 0.2s, transform 0.15s;
}

.comment-like-btn i {
    font-size: 0.78rem;
}

.comment-like-btn:hover {
    color: #e63946;
    transform: scale(1.1);
}

.comment-like-btn.clked {
    color: #e63946;
}

.clke-count {
    font-size: 0.76rem;
}

.replies-list {
    margin-left: 2rem;
    margin-top: 0.3rem;
    border-left: 2px solid var(--grey-light);
    padding-left: 0.8rem;
}

.replying-to {
    font-size: 0.8rem;
    color: var(--grey-mid);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: var(--tint-green);
    border-radius: 8px;
    margin-top: 4px;
}

.replying-to span {
    color: var(--green-mid);
    font-weight: 600;
}

.replying-to button {
    background: none;
    border: none;
    color: var(--grey-mid);
    cursor: pointer;
    font-size: 0.75rem;
    margin-left: auto;
}
/* VIEW REPLIES BUTTON */
.view-replies-btn {
    background: none;
    border: none;
    color: var(--green-mid);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 0 4px 2.5rem;
    margin-top: 2px;
    transition: color 0.2s;
}

.view-replies-btn:hover {
    color: var(--green-dark);
}
/* LIKE BUTTON */

.feed-action-btn.liked i {
    color: #e63946 !important;
    transform: scale(1.2);
}

.feed-action-btn i {
    transition: color 0.2s, transform 0.2s;
}

/* LIKE BUTTON */
.like-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--grey-dark);
    font-size: 0.95rem;
    font-family: 'Outfit', sans-serif;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
    transition: color 0.2s;
}

.like-btn:hover { color: #e63946; }
.like-btn i { font-size: 1.1rem; }

.feed-action-btn i {
    transition: color 0.2s, transform 0.2s;
}

.feed-action-btn.liked i {
    color: #e63946 !important;
    transform: scale(1.2);
}

.like-btn-feed .fa-heart {
    transition: color 0.2s, transform 0.2s;
}


/* ============================================
   17. CAMPUS MAP
============================================ */
.map-page {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 64px);
    background: #0f0f0f;
}

.map-header {
    padding: 16px 24px 8px;
    background: #111;
    border-bottom: 1px solid #222;
}

.map-header h1 {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 2px 0;
}

.map-header p {
    font-size: 13px;
    color: #888;
    margin: 0;
}

.map-controls {
    padding: 10px 24px;
    background: #111;
    border-bottom: 1px solid #222;
    overflow-x: auto;
    scrollbar-width: none;
}

.map-controls::-webkit-scrollbar { display: none; }

.filter-buttons {
    display: flex;
    gap: 8px;
    min-width: max-content;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #333;
    background: #1a1a1a;
    color: #aaa;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-family: inherit;
}

.filter-btn:hover {
    border-color: #555;
    color: #fff;
}

.filter-btn.active {
    background: #2d6a4f;
    border-color: #2d6a4f;
    color: #fff;
}

.filter-btn[data-filter="department"].active { background: #1d4ed8; border-color: #1d4ed8; }
.filter-btn[data-filter="cafe"].active       { background: #b45309; border-color: #b45309; }
.filter-btn[data-filter="masjid"].active     { background: #15803d; border-color: #15803d; }
.filter-btn[data-filter="sports"].active     { background: #7e22ce; border-color: #7e22ce; }
.filter-btn[data-filter="facility"].active   { background: #374151; border-color: #555; }

#map {
    flex: 1;
}

.map-marker {
    width: 32px;
    height: 32px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border: 3px solid rgba(255,255,255,0.9);
    cursor: pointer;
    transition: width 0.2s, height 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.map-marker:hover {
    width: 38px;
    height: 38px;
}

.map-marker.department { background: #3b82f6; }
.map-marker.cafe       { background: #f97316; }
.map-marker.masjid     { background: #22c55e; }
.map-marker.sports     { background: #a855f7; }
.map-marker.facility   { background: #9ca3af; }

.mapboxgl-popup-content {
    background: #1a1a1a !important;
    color: #fff !important;
    border-radius: 12px !important;
    padding: 14px 18px !important;
    border: 1px solid #333 !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5) !important;
    min-width: 180px;
}

.mapboxgl-popup-tip {
    border-top-color: #1a1a1a !important;
}

.popup-type {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
    opacity: 0.6;
}

.popup-name {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
    color: #fff;
}

.popup-full-name {
    font-size: 12px;
    color: #aaa;
    line-height: 1.4;
}

.popup-type.department { color: #60a5fa; }
.popup-type.cafe       { color: #fb923c; }
.popup-type.masjid     { color: #4ade80; }
.popup-type.sports     { color: #c084fc; }
.popup-type.facility   { color: #d1d5db; }

.popup-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 6px 14px;
    background: var(--green-mid, #52b788);
    color: #fff !important;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 20px;
    transition: background 0.2s;
}
.popup-view-btn:hover { background: var(--green-dark, #2d6a4f); }
.popup-view-btn:visited { color: #fff !important; }

/* Facilities grid (sports pages) */
.facilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
    margin-top: 8px;
}
.facility-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: var(--chip-grey);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-align: center;
    transition: background 0.2s, transform 0.15s, border-color 0.2s;
}
.facility-card:hover {
    border-color: var(--green-mid);
    transform: translateY(-2px);
}
.facility-card-icon {
    font-size: 1.3rem;
    color: var(--green-light, #52b788);
}
.facility-card-name {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.2;
}

/* ============================================
   18. LOGOUT PROFILE BUTTON
============================================ */
/* HASHTAG SEARCH RESULTS */
.search-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--grey-mid);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 1.2rem 0 0.6rem;
}

.hashtag-results {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1.5rem;
}

.hashtag-result-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--tint-green);
    border: 1.5px solid var(--green-accent);
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s;
}

.hashtag-result-name {
    color: var(--green-mid);
    font-weight: 700;
}

.hashtag-result-count {
    color: var(--text-secondary, var(--grey-mid));
    font-size: 0.85rem;
}

body[data-theme="dark"] .hashtag-result-name {
    color: var(--green-accent) !important;
}

/* ============================================
   SETTINGS PAGE
============================================ */
/* ============================================
   SETTINGS PAGE
============================================ */

/* Profile settings button — icon-only, must stay a perfect circle */
.profile-settings-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
    width: 38px;
    height: 38px;
    padding: 0;
    background: white;
    color: var(--green-mid);
    border: 1.5px solid var(--green-mid);
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    transition: all 0.2s;
    flex-shrink: 0;
}
.profile-settings-btn:hover {
    background: var(--green-mid);
    color: white;
}
body[data-theme="dark"] .profile-settings-btn,
body[data-theme="black"] .profile-settings-btn {
    background: transparent;
    color: #52b788;
    border-color: #52b788;
}
body[data-theme="dark"] .profile-settings-btn:hover,
body[data-theme="black"] .profile-settings-btn:hover {
    background: #52b788;
    color: #fff;
}

/* ============================================
   19. LOCATION PAGE (department / cafe / concordia / masjid / sports)
   Built entirely on theme variables, so dark mode is automatic.
============================================ */

/* Banner */
.loc-banner {
    position: relative;
    border-radius: 0 0 22px 22px;
    overflow: hidden;
    padding: 70px 24px 26px;
    color: #fff;
}
.loc-banner-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.35;
}
.loc-banner-color-overlay {
    position: absolute;
    inset: 0;
}
.loc-banner-gradient {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 60px;
    background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.25));
    pointer-events: none;
}
.loc-back-btn {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.16);
    backdrop-filter: blur(6px);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 20px;
    padding: 7px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 22px;
    transition: background 0.2s;
}
.loc-back-btn:hover { background: rgba(255,255,255,0.28); }
.loc-banner-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.loc-banner-left { min-width: 0; }
.loc-type-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
}
.loc-banner-name {
    font-size: 1.7rem;
    font-weight: 800;
    margin: 0 0 4px;
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1.15;
}
.loc-banner-fullname {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.78);
    margin: 0;
}
.loc-banner-stats {
    display: flex;
    gap: 22px;
    flex-shrink: 0;
}
.loc-banner-stat {
    text-align: center;
}
.loc-stat-num {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    font-family: 'Space Grotesk', sans-serif;
}
.loc-stat-label {
    display: block;
    font-size: 0.68rem;
    color: rgba(255,255,255,0.75);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 1px;
}

/* Body / sections */
.loc-body {
    max-width: 760px;
    margin: 0 auto;
    padding: 22px 16px 60px;
    background: var(--bg);
}
.loc-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 16px;
}
.loc-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}
.loc-section-title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}
.loc-section-title i { color: var(--green-mid); }
.loc-section-count {
    background: var(--chip-grey);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 20px;
}
.loc-see-all {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    color: var(--green-mid);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
}
.loc-see-all:hover { color: var(--green-dark); }

.loc-empty {
    text-align: center;
    padding: 30px 10px;
    color: var(--text-secondary);
}
.loc-empty i {
    font-size: 1.8rem;
    margin-bottom: 10px;
    opacity: 0.5;
    display: block;
}
.loc-empty p { font-size: 0.85rem; line-height: 1.5; margin: 0; }

.loc-divider {
    height: 1px;
    background: var(--border);
    margin: 16px 0;
}

/* Students */
.loc-students-scroll {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.loc-student-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 78px;
    flex-shrink: 0;
    text-decoration: none;
    text-align: center;
}
.loc-student-avatar {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--chip-grey);
    color: var(--green-mid);
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1.5px solid var(--border);
}
.loc-student-avatar img { width: 100%; height: 100%; object-fit: cover; }
.loc-student-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.loc-student-followers {
    font-size: 0.68rem;
    color: var(--text-secondary);
}

/* Societies */
.loc-societies-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.loc-society-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--chip-grey);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    transition: border-color 0.2s;
}
.loc-society-card:hover { border-color: var(--green-mid); }
.loc-society-logo {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--surface);
    color: var(--green-mid);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    border: 1.5px solid var(--border);
}
.loc-society-logo img { width: 100%; height: 100%; object-fit: cover; }
.loc-society-info { min-width: 0; flex: 1; }
.loc-society-top {
    display: flex;
    align-items: center;
    gap: 8px;
}
.loc-society-name {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--text-primary);
}
.loc-rank-badge {
    background: var(--tint-green);
    color: var(--green-mid);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 10px;
}
.loc-society-meta {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 2px;
}
.loc-society-latest {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.loc-society-latest strong { color: var(--text-primary); }

/* Posts grid (cafe page) */
.loc-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.loc-post-thumb {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 8px;
    background: var(--chip-grey);
}
.loc-post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.loc-post-hidden { display: none; }

/* Cafe — average ratings */
.cafe-avg-ratings {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 4px;
}
.cafe-avg-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.cafe-avg-label {
    width: 80px;
    flex-shrink: 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
}
.cafe-avg-bar-wrap {
    flex: 1;
    height: 8px;
    background: var(--chip-grey);
    border-radius: 10px;
    overflow: hidden;
}
.cafe-avg-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--green-mid), var(--green-light));
    border-radius: 10px;
}
.cafe-avg-score {
    width: 28px;
    flex-shrink: 0;
    text-align: right;
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--green-mid);
}

/* Cafe — rate form */
.cafe-rate-form {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
.cafe-rate-title {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}
.cafe-star-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.cafe-star-label {
    width: 80px;
    flex-shrink: 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.star-selector { display: flex; gap: 3px; }
.star-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.3rem;
    color: var(--border);
    transition: color 0.15s;
    padding: 0;
    line-height: 1;
}
.star-btn.filled { color: #f5b301; }
.cafe-rate-submit {
    margin-top: 10px;
    padding: 9px 18px;
    background: var(--green-mid);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}
.cafe-rate-submit:hover { background: var(--green-dark); }
.cafe-login-prompt {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding: 10px 0;
}
.cafe-login-prompt a { color: var(--green-mid); font-weight: 600; text-decoration: none; }

/* Cafe — reviews */
.cafe-review-form {
    display: flex;
    gap: 10px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 14px;
}
.cafe-review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--chip-grey);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    overflow: hidden;
    flex-shrink: 0;
}
.cafe-review-avatar.small { width: 32px; height: 32px; font-size: 1.05rem; }
.cafe-review-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cafe-review-input-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cafe-review-input-wrap textarea {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 0.86rem;
    font-family: inherit;
    background: var(--input-bg);
    color: var(--text-primary);
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
}
.cafe-review-input-wrap textarea:focus { border-color: var(--green-mid); }
.cafe-review-submit {
    align-self: flex-end;
    padding: 7px 16px;
    background: var(--green-mid);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}
.cafe-review-submit:hover { background: var(--green-dark); }

.cafe-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.cafe-review-item {
    display: flex;
    gap: 10px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.cafe-review-item:last-child { border-bottom: none; padding-bottom: 0; }
.cafe-review-body { flex: 1; min-width: 0; }
.cafe-review-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.cafe-review-username {
    font-weight: 700;
    font-size: 0.86rem;
    color: var(--text-primary);
    text-decoration: none;
}
.cafe-review-username:hover { color: var(--green-mid); }
.cafe-review-date {
    font-size: 0.74rem;
    color: var(--text-secondary);
}
.cafe-review-delete {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    margin-left: auto;
    font-size: 0.78rem;
    transition: color 0.15s;
}
.cafe-review-delete:hover { color: #e63946; }
.cafe-review-text {
    font-size: 0.86rem;
    color: var(--text-primary);
    line-height: 1.5;
    margin: 4px 0 0;
}
.cafe-review-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}
.rev-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.78rem;
    transition: color 0.15s;
}
.rev-like-btn.rev-liked { color: #e63946; }
.rev-like-count { font-size: 0.76rem; }
.rev-reply-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.78rem;
    transition: color 0.15s;
}
.rev-reply-btn:hover { color: var(--green-mid); }
.rev-toggle-replies {
    background: none;
    border: none;
    color: var(--green-mid);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    margin-top: 8px;
    padding: 0;
}
.cafe-replies {
    margin-top: 10px;
    margin-left: 18px;
    padding-left: 14px;
    border-left: 2px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.cafe-reply-item { display: flex; gap: 8px; }
.cafe-reply-box {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.cafe-reply-box textarea {
    flex: 1;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 0.82rem;
    font-family: inherit;
    background: var(--input-bg);
    color: var(--text-primary);
    resize: vertical;
    outline: none;
}
.cafe-reply-box textarea:focus { border-color: var(--green-mid); }
.cafe-reply-box button {
    align-self: flex-end;
    padding: 7px 14px;
    background: var(--green-mid);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}
.cafe-reply-box button:hover { background: var(--green-dark); }

@media (max-width: 600px) {
    .loc-banner { padding: 60px 16px 22px; }
    .loc-banner-name { font-size: 1.4rem; }
    .loc-banner-stats { gap: 14px; }
    .loc-section { padding: 14px 14px; }
    .cafe-avg-label, .cafe-star-label { width: 64px; font-size: 0.74rem; }
}

body[data-theme="dark"] .loc-society-logo,
body[data-theme="dark"] .star-btn {
    border-color: var(--border);
}