/* ===== UNIQUE FELLOWS ALL NATIONS CLUB ===== */
/* Design System: Terracotta & Cream */

:root {
    --terracotta: #B027F5;
    --deep-terracotta: #ac1ad1;
    --dark-slate: #3C4B54;
    --muted-slate: #73858F;
    --light-cream: #F8F5F2;
    --warm-sand: #EDE8E3;
    --white: #FFFFFF;
    --gold: #E5B80B;
    --success: #4CAF7D;
    --alert: #9819ca;
    
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --section-pad: 140px;
    --section-pad-mobile: 80px;
    --max-width: 1200px;
    --nav-height: 72px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    color: var(--dark-slate);
    background: var(--light-cream);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); font-weight: 500; }

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

img { max-width: 100%; display: block; }

button { cursor: pointer; font-family: inherit; }

input, select, textarea { font-family: inherit; }

/* ===== CONFETTI CANVAS ===== */
#confetti-canvas {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1; pointer-events: none;
}

/* ===== FLASH MESSAGES ===== */
.flash-message {
    position: fixed; top: 90px; right: 20px;
    padding: 14px 24px; border-radius: 8px;
    font-size: 14px; font-weight: 500;
    z-index: 9999; animation: slideIn 0.3s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.flash-success { background: var(--success); color: white; }
.flash-error { background: var(--alert); color: white; }
.flash-info { background: var(--dark-slate); color: white; }

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

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--nav-height); z-index: 50;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(60,75,84,0.08);
    transition: background 0.3s ease;
}
.navbar.scrolled {
    background: rgba(248,245,242,0.95);
}
.nav-container {
    max-width: var(--max-width); margin: 0 auto;
    padding: 0 40px; height: 100%;
    display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
    display: flex; align-items: center; gap: 12px;
}
.logo-mark {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--terracotta);
    display: flex; align-items: center; justify-content: center;
    color: white; font-family: var(--font-display);
    font-weight: 700; font-size: 14px;
}
.logo-text {
    font-size: 11px; font-weight: 600;
    letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--muted-slate);
}
.nav-links {
    display: flex; align-items: center; gap: 32px;
}
.nav-link {
    font-size: 15px; font-weight: 500;
    color: var(--dark-slate);
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease;
}
.nav-link:hover, .nav-link.active {
    color: var(--terracotta);
    border-bottom-color: var(--terracotta);
}
.btn-login {
    background: var(--terracotta); color: white;
    font-size: 15px; font-weight: 600;
    border-radius: 24px; padding: 10px 24px;
    border: none;
    transition: background 0.2s ease, transform 0.2s ease;
}
.btn-login:hover {
    background: var(--deep-terracotta);
    transform: scale(1.02);
}
.nav-toggle {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; padding: 5px;
}
.nav-toggle span {
    display: block; width: 24px; height: 2px;
    background: var(--dark-slate);
    transition: 0.3s ease;
}

/* Mobile overlay */
.mobile-overlay {
    display: none; position: fixed; inset: 0;
    background: var(--light-cream); z-index: 100;
    flex-direction: column; align-items: center; justify-content: center;
    gap: 32px; opacity: 0; transition: opacity 0.3s ease;
}
.mobile-overlay.active { display: flex; opacity: 1; }
.mobile-close {
    position: absolute; top: 20px; right: 20px;
    background: none; border: none;
    font-size: 40px; color: var(--dark-slate); cursor: pointer;
}
.mobile-links { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.mobile-links a {
    font-family: var(--font-display); font-size: 28px; font-weight: 500;
    color: var(--dark-slate);
}
.mobile-links a:hover { color: var(--terracotta); }

/* ===== SECTIONS ===== */
.section { padding: var(--section-pad) 0; }
.section-sm { padding: var(--section-pad-mobile) 0; }
.container {
    max-width: var(--max-width); margin: 0 auto;
    padding: 0 40px;
}

/* ===== LABELS ===== */
.label {
    font-size: 11px; font-weight: 600;
    letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--terracotta);
}
.label-white {
    font-size: 11px; font-weight: 600;
    letter-spacing: 0.06em; text-transform: uppercase;
    color: rgba(255,255,255,0.85);
}

/* ===== HERO SECTIONS ===== */
.hero {
    position: relative; min-height: 100dvh;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.hero-bg {
    position: absolute; inset: 0; z-index: 0;
}
.hero-bg img {
    width: 100%; height: 100%; object-fit: cover;
}
.hero-overlay {
    position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(180deg, rgba(60,75,84,0.5) 0%, rgba(60,75,84,0.3) 50%, rgba(60,75,84,0.6) 100%);
}
.hero-content {
    position: relative; z-index: 3;
    text-align: center; max-width: 800px;
    padding: 0 20px; padding-top: 80px;
}
.hero-title {
    font-size: clamp(48px, 8vw, 80px);
    font-weight: 500; color: white;
    line-height: 0.85; letter-spacing: -0.04em;
    text-shadow: 0 2px 40px rgba(0,0,0,0.3);
}
.hero-subtitle {
    font-size: 17px; color: rgba(255,255,255,0.9);
    max-width: 560px; margin: 32px auto 0;
    line-height: 1.7;
}
.hero-cta {
    display: flex; gap: 16px; justify-content: center;
    margin-top: 48px; flex-wrap: wrap;
}

/* Hero compact variants */
.hero-compact { min-height: 50vh; }
.hero-compact .hero-title { font-size: clamp(40px, 6vw, 64px); }
.hero-slate { background: var(--dark-slate); }
.hero-gradient {
    background: linear-gradient(135deg, #E8684A 0%, #D455A 50%, #3C4B54 100%);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block; padding: 14px 32px;
    font-size: 15px; font-weight: 600;
    border-radius: 8px; border: none;
    cursor: pointer; transition: all 0.2s ease;
}
.btn-primary {
    background: var(--terracotta); color: white;
}
.btn-primary:hover {
    background: var(--deep-terracotta); transform: scale(1.02);
}
.btn-secondary {
    background: transparent;
    border: 1.5px solid var(--dark-slate);
    color: var(--dark-slate);
}
.btn-secondary:hover {
    background: var(--dark-slate); color: white;
}
.btn-white {
    background: white; color: var(--terracotta);
}
.btn-white:hover { background: var(--light-cream); transform: scale(1.03); }
.btn-outline-white {
    background: transparent; border: 1.5px solid white; color: white;
}
.btn-outline-white:hover { background: rgba(255,255,255,0.1); }
.btn-full { width: 100%; text-align: center; }

/* ===== CARDS ===== */
.card {
    background: white; border-radius: 16px; padding: 32px;
    box-shadow: 0 2px 16px rgba(60,75,84,0.06);
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}
.card:hover {
    box-shadow: 0 8px 32px rgba(60,75,84,0.1);
    transform: translateY(-2px);
}

/* Blog Card */
.blog-card {
    background: white; border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(60,75,84,0.06);
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}
.blog-card:hover {
    box-shadow: 0 8px 32px rgba(60,75,84,0.1);
    transform: translateY(-2px);
}
.blog-card-img {
    aspect-ratio: 16/10; overflow: hidden;
}
.blog-card-img img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s ease;
}
.blog-card:hover .blog-card-img img { transform: scale(1.03); }
.blog-card-body { padding: 24px; }
.blog-card-title {
    font-family: var(--font-display); font-size: 20px;
    font-weight: 600; color: var(--dark-slate);
    line-height: 1.2; margin-top: 8px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-card-excerpt {
    font-size: 14px; color: var(--muted-slate);
    margin-top: 12px; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-card-link {
    display: inline-block; margin-top: 16px;
    color: var(--terracotta); font-weight: 600; font-size: 15px;
}
.blog-card-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Member Card */
.member-card {
    position: relative; border-radius: 16px;
    overflow: hidden; background: white;
    box-shadow: 0 2px 16px rgba(60,75,84,0.06);
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}
.member-card:hover {
    box-shadow: 0 8px 32px rgba(60,75,84,0.1);
    transform: translateY(-2px);
}
.member-card-img { aspect-ratio: 1/1; overflow: hidden; }
.member-card-img img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s ease;
}
.member-card:hover .member-card-img img { transform: scale(1.05); }
.member-card-overlay {
    position: absolute; inset-x: 0; bottom: 0;
    background: linear-gradient(to top, rgba(60,75,84,0.7), transparent);
    padding: 80px 20px 20px;
}
.member-card-name {
    font-family: var(--font-display); font-size: 18px;
    font-weight: 600; color: white;
}
.member-card-role {
    font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: rgba(255,255,255,0.8); margin-top: 4px;
}

/* ===== FORMS ===== */
.form-group { margin-bottom: 16px; }
.form-label {
    display: block; font-size: 14px; font-weight: 500;
    color: var(--dark-slate); margin-bottom: 6px;
}
.form-input, .form-select, .form-textarea {
    width: 100%;
    background: white; border: 1.5px solid var(--warm-sand);
    border-radius: 8px; padding: 14px 16px;
    font-size: 15px; color: var(--dark-slate);
    outline: none; transition: all 0.2s ease;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--terracotta);
    box-shadow: 0 0 0 3px rgba(232,104,74,0.1);
}
.form-textarea { min-height: 160px; resize: vertical; }
.form-select { appearance: none; cursor: pointer; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-help {
    font-size: 13px; color: var(--muted-slate); margin-top: 6px;
}

/* ===== TIMELINE ===== */
.timeline {
    position: relative; max-width: 900px; margin: 0 auto;
}
.timeline::before {
    content: ''; position: absolute; left: 50%; top: 0; bottom: 0;
    width: 2px; background: var(--terracotta); transform: translateX(-50%);
}
.timeline-item {
    position: relative; display: flex; align-items: center;
    margin-bottom: 40px;
}
.timeline-item:nth-child(odd) { flex-direction: row; }
.timeline-item:nth-child(even) { flex-direction: row-reverse; }
.timeline-content {
    width: calc(50% - 40px);
    display: flex; align-items: center; gap: 16px;
}
.timeline-item:nth-child(odd) .timeline-content { margin-right: auto; padding-right: 20px; justify-content: flex-end; }
.timeline-item:nth-child(even) .timeline-content { margin-left: auto; padding-left: 20px; }
.timeline-dot {
    position: absolute; left: 50%; transform: translateX(-50%);
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--terracotta); border: 4px solid var(--warm-sand);
    z-index: 2;
}
.timeline-img {
    width: 80px; height: 80px; border-radius: 50%;
    object-fit: cover; border: 3px solid var(--terracotta);
    flex-shrink: 0;
}
.timeline-info h4 { font-size: 18px; font-weight: 600; color: var(--dark-slate); }
.timeline-info p { font-size: 14px; color: var(--muted-slate); }
.timeline-years {
    font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--terracotta);
}
.badge-live {
    display: inline-block; background: var(--success);
    color: white; font-size: 9px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.05em;
    padding: 2px 8px; border-radius: 4px; margin-left: 6px;
}

/* ===== GALLERY SLIDER ===== */
.gallery-slider { overflow: hidden; position: relative; }
.gallery-track {
    display: flex; transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
}
.gallery-slide {
    min-width: 80vw; max-width: 1200px;
    flex-shrink: 0; margin: 0 20px;
    border-radius: 16px; overflow: hidden;
    position: relative;
}
.gallery-slide img {
    width: 100%; aspect-ratio: 16/9; object-fit: cover;
}
.gallery-caption {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(60,75,84,0.7), transparent);
    padding: 60px 24px 24px;
}
.gallery-caption h4 { font-size: 20px; font-weight: 600; color: white; }
.gallery-caption span { font-size: 14px; color: rgba(255,255,255,0.8); }
.gallery-dots {
    display: flex; justify-content: center; gap: 12px; margin-top: 32px;
}
.gallery-dot {
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--muted-slate); opacity: 0.5;
    border: none; cursor: pointer; transition: all 0.3s ease;
}
.gallery-dot.active { background: var(--terracotta); opacity: 1; transform: scale(1.2); }
.gallery-dot:hover { opacity: 0.8; }

/* ===== ACCORDION ===== */
.accordion-item { border-bottom: 1px solid var(--warm-sand); }
.accordion-header {
    width: 100%; display: flex; justify-content: space-between; align-items: center;
    padding: 20px 0; background: none; border: none;
    font-size: 17px; font-weight: 500; color: var(--dark-slate);
    text-align: left; cursor: pointer;
}
.accordion-header:hover { color: var(--terracotta); }
.accordion-icon { transition: transform 0.2s ease; flex-shrink: 0; margin-left: 12px; }
.accordion-icon.open { transform: rotate(180deg); }
.accordion-body {
    display: grid; grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease;
}
.accordion-body.open { grid-template-rows: 1fr; }
.accordion-body > div { overflow: hidden; }
.accordion-body p { padding-bottom: 24px; font-size: 14px; color: var(--muted-slate); line-height: 1.6; }

/* ===== SCROLL ANIMATIONS ===== */
.reveal {
    opacity: 0; transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4,0,0.2,1), transform 0.8s cubic-bezier(0.4,0,0.2,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-left { transform: translateX(-30px); }
.reveal-left.visible { transform: translateX(0); }
.reveal-right { transform: translateX(30px); }
.reveal-right.visible { transform: translateX(0); }

/* ===== BOUNCE DOWN ANIMATION ===== */
@keyframes bounce-down {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}
.animate-bounce-down { animation: bounce-down 2s ease-in-out infinite; }

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
    position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.scroll-indicator svg { color: white; opacity: 0.6; }
.scroll-indicator span { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,0.5); }

/* ===== FOOTER ===== */
.footer { background: var(--dark-slate); color: var(--light-cream); }
.footer-container { max-width: var(--max-width); margin: 0 auto; padding: 80px 40px 40px; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 40px; }
.footer-club-name { font-size: 14px; color: var(--muted-slate); line-height: 1.5; margin-top: 12px; }
.footer-est { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted-slate); margin-top: 8px; display: block; }
.footer-heading { font-family: var(--font-display); font-size: 20px; font-weight: 600; color: white; margin-bottom: 20px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { font-size: 14px; color: var(--muted-slate); transition: color 0.2s ease; }
.footer-links a:hover { color: var(--terracotta); }
.footer-social { display: flex; gap: 16px; margin-bottom: 12px; }
.footer-social a { color: var(--muted-slate); transition: color 0.2s ease; }
.footer-social a:hover { color: var(--terracotta); }
.footer-email { font-size: 14px; color: var(--muted-slate); }
.footer-bottom { border-top: 1px solid rgba(115,133,143,0.2); margin-top: 60px; padding-top: 32px; text-align: center; }
.footer-bottom p { font-size: 14px; color: var(--muted-slate); }

/* ===== PAGE HEADER ===== */
.page-header { background: var(--light-cream); padding: 40px 0; border-bottom: 1px solid var(--warm-sand); }
.page-header h1 { font-size: 36px; color: var(--dark-slate); }
.breadcrumb { font-size: 13px; color: var(--muted-slate); margin-top: 8px; }
.breadcrumb a { color: var(--terracotta); }
.breadcrumb a:hover { text-decoration: underline; }

/* ===== ADMIN LAYOUT ===== */
.admin-wrapper { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 260px; background: var(--dark-slate);
    color: white; flex-shrink: 0; position: fixed;
    top: 0; left: 0; bottom: 0; overflow-y: auto;
    z-index: 60;
}
.admin-sidebar-header {
    padding: 24px; border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex; align-items: center; gap: 12px;
}
.admin-sidebar-header .logo-mark { width: 36px; height: 36px; font-size: 12px; }
.admin-sidebar-header span { font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.admin-nav { list-style: none; padding: 16px 0; }
.admin-nav li a {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 24px; font-size: 14px;
    color: rgba(255,255,255,0.7); transition: all 0.2s ease;
}
.admin-nav li a:hover, .admin-nav li a.active {
    background: rgba(232,104,74,0.15); color: var(--terracotta);
    border-right: 3px solid var(--terracotta);
}
.admin-nav svg { width: 18px; height: 18px; flex-shrink: 0; }
.admin-main { flex: 1; margin-left: 260px; background: var(--light-cream); min-height: 100vh; }
.admin-topbar {
    height: 60px; background: white;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 32px; box-shadow: 0 1px 0 var(--warm-sand);
    position: sticky; top: 0; z-index: 10;
}
.admin-content { padding: 32px; }

/* Stats cards */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; margin-bottom: 32px; }
.stat-card { background: white; border-radius: 12px; padding: 24px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.stat-card-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted-slate); }
.stat-card-value { font-family: var(--font-display); font-size: 32px; font-weight: 600; color: var(--dark-slate); margin-top: 8px; }
.stat-card-value.text-terracotta { color: var(--terracotta); }
.stat-card-value.text-success { color: var(--success); }

/* Data tables */
.data-table { width: 100%; border-collapse: collapse; background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.data-table th { background: var(--light-cream); text-align: left; padding: 14px 20px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted-slate); }
.data-table td { padding: 14px 20px; font-size: 14px; color: var(--dark-slate); border-bottom: 1px solid var(--warm-sand); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(248,245,242,0.5); }
.table-img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }

/* Action buttons */
.btn-sm { padding: 6px 14px; font-size: 13px; border-radius: 6px; }
.btn-edit { background: #EBF5FF; color: #2563EB; }
.btn-edit:hover { background: #DBEAFE; }
.btn-delete { background: #FEF2F2; color: var(--alert); }
.btn-delete:hover { background: #FEE2E2; }
.btn-view { background: #F0FDF4; color: var(--success); }
.btn-view:hover { background: #DCFCE7; }

/* ===== LOGIN PAGES ===== */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--light-cream); }
.login-box { background: white; border-radius: 16px; padding: 48px; width: 100%; max-width: 420px; box-shadow: 0 4px 24px rgba(0,0,0,0.06); }
.login-box h1 { font-size: 28px; text-align: center; margin-bottom: 8px; }
.login-box p { text-align: center; color: var(--muted-slate); font-size: 14px; margin-bottom: 32px; }
.login-logo { display: flex; justify-content: center; margin-bottom: 24px; }

/* ===== MEMBERS PANEL ===== */
.member-sidebar { width: 280px; }
.member-nav { list-style: none; }
.member-nav li a {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 20px; font-size: 15px;
    color: rgba(255,255,255,0.7); border-radius: 8px;
    margin: 4px 16px; transition: all 0.2s ease;
}
.member-nav li a:hover, .member-nav li a.active {
    background: rgba(232,104,74,0.15); color: var(--terracotta);
}
.member-nav svg { width: 18px; height: 18px; flex-shrink: 0; }
.member-main { margin-left: 280px; }

/* Finance cards */
.finance-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; margin-bottom: 32px; }
.finance-card { background: white; border-radius: 12px; padding: 24px; border-left: 4px solid var(--terracotta); }
.finance-card.success { border-left-color: var(--success); }
.finance-card.alert { border-left-color: var(--alert); }
.finance-card-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted-slate); }
.finance-card-value { font-family: var(--font-display); font-size: 28px; font-weight: 600; color: var(--dark-slate); margin-top: 8px; }

/* Chat */
.chat-layout { display: flex; height: calc(100vh - 140px); background: white; border-radius: 12px; overflow: hidden; }
.chat-sidebar { width: 280px; border-right: 1px solid var(--warm-sand); overflow-y: auto; }
.chat-contact { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; transition: background 0.2s; }
.chat-contact:hover, .chat-contact.active { background: var(--light-cream); }
.chat-contact img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.chat-contact-name { font-size: 14px; font-weight: 600; color: var(--dark-slate); }
.chat-contact-preview { font-size: 12px; color: var(--muted-slate); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.chat-unread { background: var(--terracotta); color: white; font-size: 11px; font-weight: 600; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; margin-left: auto; }
.chat-main { flex: 1; display: flex; flex-direction: column; }
.chat-header { padding: 16px 24px; border-bottom: 1px solid var(--warm-sand); display: flex; align-items: center; gap: 12px; }
.chat-header img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.chat-messages { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.chat-msg { max-width: 70%; padding: 12px 16px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
.chat-msg.sent { align-self: flex-end; background: var(--terracotta); color: white; border-bottom-right-radius: 4px; }
.chat-msg.received { align-self: flex-start; background: var(--light-cream); color: var(--dark-slate); border-bottom-left-radius: 4px; }
.chat-msg-time { font-size: 11px; opacity: 0.6; margin-top: 4px; }
.chat-input-bar { padding: 16px 24px; border-top: 1px solid var(--warm-sand); display: flex; gap: 12px; }
.chat-input-bar input { flex: 1; border: 1px solid var(--warm-sand); border-radius: 24px; padding: 10px 20px; outline: none; }
.chat-input-bar input:focus { border-color: var(--terracotta); }

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-terracotta { color: var(--terracotta); }
.text-muted { color: var(--muted-slate); }
.text-white { color: white; }
.text-dark { color: var(--dark-slate); }
.text-success { color: var(--success); }
.text-alert { color: var(--alert); }

.bg-white { background: white; }
.bg-cream { background: var(--light-cream); }
.bg-sand { background: var(--warm-sand); }
.bg-terracotta { background: var(--terracotta); }
.bg-slate { background: var(--dark-slate); }

.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mt-10 { margin-top: 40px; } .mt-12 { margin-top: 48px; }
.mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; } .mb-8 { margin-bottom: 32px; }
.mx-auto { margin-left: auto; margin-right: auto; }

.p-4 { padding: 16px; } .p-6 { padding: 24px; } .p-8 { padding: 32px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.px-4 { padding-left: 16px; padding-right: 16px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.shrink-0 { flex-shrink: 0; }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.gap-6 { gap: 24px; }

.w-full { width: 100%; }
.max-w-lg { max-width: 520px; }
.max-w-xl { max-width: 640px; }
.max-w-2xl { max-width: 800px; }
.max-w-3xl { max-width: 1000px; }
.max-w-4xl { max-width: var(--max-width); }

.rounded-lg { border-radius: 12px; }
.rounded-xl { border-radius: 16px; }
.rounded-full { border-radius: 50%; }

.shadow-sm { box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.shadow-md { box-shadow: 0 4px 16px rgba(0,0,0,0.06); }

.font-display { font-family: var(--font-display); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-sm { font-size: 14px; }
.text-lg { font-size: 18px; }
.text-xl { font-size: 20px; }
.text-2xl { font-size: 24px; }
.text-3xl { font-size: 32px; }

.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.hidden { display: none; }
.block { display: block; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
    .admin-sidebar { transform: translateX(-100%); transition: transform 0.3s ease; }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-main { margin-left: 0; }
    .member-main { margin-left: 0; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-toggle { display: flex; }
    .container, .footer-container { padding: 0 20px; }
    .section { padding: var(--section-pad-mobile) 0; }
    .hero-title { font-size: 48px; }
    .hero-cta { flex-direction: column; align-items: center; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .timeline::before { left: 20px; }
    .timeline-item, .timeline-item:nth-child(odd), .timeline-item:nth-child(even) { flex-direction: row; }
    .timeline-content { width: 100%; margin-left: 40px !important; padding-left: 20px !important; padding-right: 0 !important; justify-content: flex-start !important; }
    .timeline-dot { left: 20px; }
    .gallery-slide { min-width: 90vw; }
    .stats-grid, .finance-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-wrapper { flex-direction: column; }
    .admin-sidebar { width: 100%; position: relative; }
    .admin-main { margin-left: 0; }
    .login-box { padding: 32px 24px; margin: 20px; }
    .chat-layout { flex-direction: column; height: auto; }
    .chat-sidebar { width: 100%; max-height: 300px; border-right: none; border-bottom: 1px solid var(--warm-sand); }
}

@media (max-width: 480px) {
    .stats-grid, .finance-grid { grid-template-columns: 1fr; }
    .hero-title { font-size: 40px; }
}

/* Make every table scroll horizontally on mobile */
@media (max-width: 768px) {
    .admin-content table,
    .data-table,
    table:not([class*="no-scroll"]) {
        display: block !important;
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
    
    /* Optional: add a subtle border to indicate scrollability */
    .admin-content table {
        border: 1px solid #e2e8f0;
        border-radius: 12px;
    }
}

/* ===== BLOG ARTICLE FORMATTING & WYSIWYG STYLES ===== */
.article-content {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.8;
    color: var(--dark-slate);
}
.article-content p {
    margin-bottom: 1.5rem;
}
.article-content h1, .article-content h2, .article-content h3, .article-content h4, .article-content h5, .article-content h6 {
    font-family: var(--font-display);
    color: var(--dark-slate);
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    line-height: 1.3;
}
.article-content h1 { font-size: 2.2rem; }
.article-content h2 { font-size: 1.8rem; }
.article-content h3 { font-size: 1.4rem; }
.article-content h4 { font-size: 1.2rem; }

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 20px rgba(60,75,84,0.08);
}
.article-content blockquote {
    border-left: 4px solid var(--terracotta);
    padding: 16px 24px;
    margin: 1.8rem 0;
    background: var(--light-cream);
    border-radius: 0 16px 16px 0;
    font-style: italic;
    font-size: 1.15rem;
    color: #334155;
}
.article-content ul, .article-content ol {
    margin: 1.2rem 0 1.5rem 1.8rem;
    padding-left: 0.5rem;
}
.article-content li {
    margin-bottom: 0.5rem;
}
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.8rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.article-content th, .article-content td {
    padding: 12px 16px;
    border: 1px solid var(--warm-sand);
}
.article-content th {
    background: var(--light-cream);
    font-weight: 600;
}
.article-content .highlight-box {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left: 5px solid #16a34a;
    padding: 20px;
    border-radius: 14px;
    margin: 20px 0;
}
.article-content .quote-card {
    background: #fafaf9;
    border-top: 3px solid var(--terracotta);
    padding: 24px;
    border-radius: 16px;
    margin: 24px 0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}
.article-content .notice-banner {
    background: #fef3c7;
    border: 1px solid #fde68a;
    padding: 18px;
    border-radius: 14px;
    color: #92400e;
    margin: 20px 0;
    font-weight: 500;
}
.article-content .grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 24px 0;
}
@media (max-width: 640px) {
    .article-content .grid-2col {
        grid-template-columns: 1fr;
    }
}