/* ============================================================
   Biz2Biz Chamber — Member Portal CSS
   ============================================================ */

:root {
  --primary: #1a56db;
  --primary-dark: #1e3a8a;
  --primary-light: #eff6ff;
  --accent: #f59e0b;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --dark: #0f172a;
  --gray-900: #111827;
  --gray-700: #374151;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --white: #ffffff;
  --sidebar-width: 260px;
  --topbar-height: 60px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.10), 0 10px 40px rgba(0,0,0,0.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body { font-family: var(--font); color: var(--gray-700); background: #f1f5f9; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1,h2,h3,h4,h5 { color: var(--dark); font-weight: 700; line-height: 1.2; }
p { margin-bottom: 0; }
img { max-width: 100%; }

/* ============================================================
   LAYOUT
   ============================================================ */
.member-layout { display: flex; min-height: 100vh; }
.member-main { flex: 1; margin-left: var(--sidebar-width); display: flex; flex-direction: column; min-height: 100vh; min-width: 0; }
.member-content { flex: 1; padding: 24px; max-width: 1200px; width: 100%; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-width);
  background: var(--dark); display: flex; flex-direction: column;
  z-index: 200; transition: transform 0.3s; overflow-y: auto;
}
.sidebar-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 12px; border-bottom: 1px solid rgba(255,255,255,0.06); flex-shrink: 0; }
.sidebar-logo { display: flex; align-items: center; gap: 10px; color: var(--white); font-size: 1rem; font-weight: 700; text-decoration: none; }
.sidebar-close { display: none; background: none; border: none; color: var(--gray-400); font-size: 1.1rem; cursor: pointer; padding: 4px; }
.sidebar-nav { flex: 1; padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.sidebar-link { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: var(--gray-400); font-size: 0.85rem; font-weight: 500; text-decoration: none; transition: all 0.15s; }
.sidebar-link i { font-size: 1rem; width: 20px; flex-shrink: 0; }
.sidebar-link:hover { background: rgba(255,255,255,0.07); color: var(--white); text-decoration: none; }
.sidebar-link.active { background: rgba(26,86,219,0.25); color: var(--white); }
.sidebar-link.active i { color: #60a5fa; }
.sidebar-admin { background: rgba(245,158,11,0.12) !important; color: var(--accent) !important; margin-top: 4px; }
.sidebar-admin:hover { background: rgba(245,158,11,0.2) !important; }
.sidebar-divider { height: 1px; background: rgba(255,255,255,0.06); margin: 6px 2px; }
.sidebar-section-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.3); padding: 6px 12px 4px; }
.sidebar-footer { padding: 14px; border-top: 1px solid rgba(255,255,255,0.06); flex-shrink: 0; }
.sidebar-user { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sidebar-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: var(--white); font-size: 0.85rem; font-weight: 700; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.sidebar-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-user-name { font-size: 0.8rem; font-weight: 600; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-org { font-size: 0.72rem; color: var(--gray-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-logout { width: 100%; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; color: var(--gray-400); font-size: 0.8rem; padding: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; transition: all 0.15s; font-family: var(--font); }
.sidebar-logout:hover { background: rgba(239,68,68,0.15); color: var(--danger); border-color: rgba(239,68,68,0.2); }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 190; }

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  height: var(--topbar-height); background: var(--white); border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center; padding: 0 24px; gap: 16px;
  position: sticky; top: 0; z-index: 100; flex-shrink: 0;
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.topbar-toggle { display: none; background: none; border: none; font-size: 1.3rem; cursor: pointer; color: var(--gray-700); padding: 4px; }
.topbar-title { font-size: 1rem; font-weight: 700; color: var(--dark); white-space: nowrap; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.topbar-search { display: flex; align-items: center; gap: 8px; background: var(--gray-100); border-radius: 8px; padding: 7px 14px; }
.topbar-search i { color: var(--gray-400); font-size: 0.85rem; }
.topbar-search input { background: none; border: none; outline: none; font-size: 0.85rem; color: var(--dark); width: 200px; font-family: var(--font); }
.topbar-search input::placeholder { color: var(--gray-400); }
.topbar-icon-btn { position: relative; background: var(--gray-100); border: none; border-radius: 8px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--gray-700); font-size: 1rem; }
.topbar-icon-btn:hover { background: var(--gray-200); }
.topbar-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: var(--white); font-size: 0.85rem; font-weight: 700; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; }
.topbar-avatar img { width: 100%; height: 100%; object-fit: cover; }
.notif-badge { position: absolute; top: -4px; right: -4px; background: var(--danger); color: var(--white); font-size: 0.65rem; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--white); }

/* Notification dropdown */
.topbar-notif { position: relative; }
.notif-dropdown { display: none; position: absolute; top: 44px; right: 0; width: 320px; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 300; }
.topbar-notif.open .notif-dropdown { display: block; }
.notif-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--gray-200); font-size: 0.875rem; font-weight: 600; }
.notif-header a { font-size: 0.8rem; font-weight: 500; color: var(--primary); }
.notif-empty { text-align: center; padding: 28px; color: var(--gray-400); font-size: 0.85rem; }
.notif-empty i { font-size: 1.8rem; display: block; margin-bottom: 8px; }

/* ============================================================
   FLASH (portal)
   ============================================================ */
.flash { display: flex; align-items: center; gap: 10px; padding: 12px 24px; font-size: 0.875rem; font-weight: 500; }
.flash button { background: none; border: none; cursor: pointer; margin-left: auto; opacity: 0.7; font-size: 1rem; }
.flash-success { background: #d1fae5; color: #065f46; border-bottom: 1px solid #a7f3d0; }
.flash-error { background: #fee2e2; color: #991b1b; border-bottom: 1px solid #fca5a5; }

/* ============================================================
   DASHBOARD
   ============================================================ */
.dash-welcome { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.dash-welcome h2 { font-size: 1.25rem; margin-bottom: 4px; }
.dash-welcome p { color: var(--gray-500); font-size: 0.875rem; }
.membership-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; flex-shrink: 0; }
.membership-badge.active { background: #d1fae5; color: #065f46; }
.membership-badge.pending { background: #fef3c7; color: #92400e; }
.membership-badge.expired { background: #fee2e2; color: #991b1b; text-decoration: none; }
.expiry-warn { background: #fef3c7; color: #92400e; padding: 2px 8px; border-radius: 10px; font-size: 0.72rem; }

.stats-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--white); border-radius: var(--radius); padding: 18px; border: 1px solid var(--gray-200); display: flex; align-items: center; gap: 14px; }
.stat-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.stat-num { font-size: 1.5rem; font-weight: 800; color: var(--dark); line-height: 1; }
.stat-label { font-size: 0.75rem; color: var(--gray-500); margin-top: 2px; }

.info-banner { display: flex; align-items: flex-start; gap: 12px; background: #dbeafe; border: 1px solid #93c5fd; border-radius: var(--radius); padding: 16px 20px; margin-bottom: 20px; font-size: 0.875rem; }
.info-banner i { color: var(--primary); font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }

.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
.dash-widget { background: var(--white); border-radius: var(--radius); border: 1px solid var(--gray-200); overflow: hidden; }
.widget-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 12px; border-bottom: 1px solid var(--gray-200); }
.widget-header h3 { font-size: 0.875rem; font-weight: 700; color: var(--dark); display: flex; align-items: center; gap: 7px; }
.widget-header h3 i { color: var(--primary); }
.widget-link { font-size: 0.78rem; color: var(--primary); display: flex; align-items: center; gap: 4px; }
.widget-list { display: flex; flex-direction: column; }
.widget-item { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--gray-100); transition: background 0.15s; text-decoration: none; color: inherit; }
.widget-item:last-child { border-bottom: none; }
.widget-item:hover { background: var(--gray-100); text-decoration: none; }
.wi-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; flex-shrink: 0; }
.wi-blue { background: var(--primary-light); color: var(--primary); }
.wi-green { background: #d1fae5; color: #065f46; }
.wi-amber { background: #fef3c7; color: #92400e; }
.wi-body { flex: 1; min-width: 0; }
.wi-title { font-size: 0.82rem; font-weight: 600; color: var(--dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wi-meta { font-size: 0.75rem; color: var(--gray-400); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wi-cat { text-transform: capitalize; }
.wi-time { font-size: 0.72rem; color: var(--gray-400); flex-shrink: 0; white-space: nowrap; }
.wi-date { width: 36px; text-align: center; background: var(--primary); color: var(--white); border-radius: 6px; padding: 3px; flex-shrink: 0; }
.wi-month { display: block; font-size: 0.6rem; font-weight: 600; text-transform: uppercase; }
.wi-day { display: block; font-size: 1rem; font-weight: 800; line-height: 1; }
.wi-status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 3px; }
.dot-green { background: var(--success); }
.dot-amber { background: var(--warning); }
.dot-gray { background: var(--gray-300); }
.widget-empty { text-align: center; padding: 28px; color: var(--gray-400); font-size: 0.8rem; }
.widget-empty i { font-size: 1.5rem; display: block; margin-bottom: 8px; }
.widget-cta { display: flex; align-items: center; gap: 6px; justify-content: center; padding: 10px; background: var(--gray-100); color: var(--primary); font-size: 0.8rem; font-weight: 600; text-decoration: none; border-top: 1px solid var(--gray-200); transition: background 0.15s; }
.widget-cta:hover { background: var(--primary-light); text-decoration: none; }

/* Quick Actions */
.quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; padding: 0; }
.qa-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 8px; color: var(--gray-700); text-decoration: none; border-right: 1px solid var(--gray-100); border-bottom: 1px solid var(--gray-100); transition: all 0.15s; font-size: 0.75rem; font-weight: 500; }
.qa-btn:hover { background: var(--primary-light); color: var(--primary); text-decoration: none; }
.qa-btn i { font-size: 1.2rem; color: var(--primary); }
.qa-btn:nth-child(3n) { border-right: none; }
.qa-btn:nth-last-child(-n+3) { border-bottom: none; }

/* ============================================================
   PROFILE PAGE
   ============================================================ */
.profile-page { max-width: 800px; }
.profile-tabs { display: flex; gap: 0; margin-bottom: 24px; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); overflow: hidden; }
.ptab { flex: 1; padding: 12px; background: none; border: none; font-size: 0.875rem; font-weight: 600; cursor: pointer; color: var(--gray-500); transition: all 0.15s; font-family: var(--font); }
.ptab.active { background: var(--primary); color: var(--white); }
.ptab:hover:not(.active) { background: var(--gray-100); }
.ptab-content { display: none; }
.ptab-content.active { display: block; }
.profile-form { display: flex; flex-direction: column; gap: 20px; }
.form-card { background: var(--white); border-radius: var(--radius); padding: 24px; border: 1px solid var(--gray-200); }
.form-card h3 { font-size: 1rem; margin-bottom: 20px; color: var(--dark); padding-bottom: 10px; border-bottom: 1px solid var(--gray-200); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group label { font-size: 0.8rem; font-weight: 600; color: var(--dark); }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 9px 12px; border: 1.5px solid var(--gray-200); border-radius: 8px; font-size: 0.875rem; font-family: var(--font); color: var(--dark); background: var(--white); transition: border-color 0.15s; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,86,219,0.08); }
.form-group input:disabled { background: var(--gray-100); color: var(--gray-400); }
.form-help { font-size: 0.75rem; color: var(--gray-400); }
.form-actions { display: flex; align-items: center; gap: 12px; }
.logo-upload-area { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }
.current-logo { width: 80px; height: 80px; border-radius: var(--radius-sm); background: var(--gray-100); overflow: hidden; display: flex; align-items: center; justify-content: center; border: 1px solid var(--gray-200); }
.current-logo img { width: 100%; height: 100%; object-fit: cover; }
.logo-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--gray-400); font-size: 2rem; }
.avatar-upload { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }
.current-avatar { width: 72px; height: 72px; border-radius: 50%; background: var(--primary); color: var(--white); font-size: 1.2rem; font-weight: 700; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 2px solid var(--gray-200); }
.current-avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-initials { font-size: 1.2rem; font-weight: 700; }

/* ============================================================
   BILLING PAGE
   ============================================================ */
.billing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.billing-status-card { grid-row: span 2; }
.membership-status-display { display: flex; flex-direction: column; gap: 20px; }
.ms-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 20px; font-size: 0.875rem; font-weight: 700; align-self: flex-start; }
.ms-active { background: #d1fae5; color: #065f46; }
.ms-pending { background: #fef3c7; color: #92400e; }
.ms-expired, .ms-cancelled { background: #fee2e2; color: #991b1b; }
.ms-suspended { background: #fdf4ff; color: #7e22ce; }
.ms-details { display: flex; flex-direction: column; gap: 10px; }
.ms-detail-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.875rem; padding-bottom: 8px; border-bottom: 1px solid var(--gray-100); }
.ms-detail-row span { color: var(--gray-500); }
.ms-no-membership { text-align: center; padding: 20px 0; }
.ms-no-membership p { color: var(--gray-500); margin-bottom: 16px; }
.billing-features h4 { font-size: 0.875rem; margin-bottom: 10px; }
.billing-features ul { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.billing-features li { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; }
.billing-features li i { color: var(--success); flex-shrink: 0; }
.transaction-list { display: flex; flex-direction: column; gap: 0; }
.transaction-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--gray-100); }
.transaction-item:last-child { border-bottom: none; }
.ti-icon { width: 36px; height: 36px; border-radius: 8px; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ti-body { flex: 1; }
.ti-desc { font-size: 0.85rem; font-weight: 600; color: var(--dark); }
.ti-date { font-size: 0.75rem; color: var(--gray-400); }
.ti-amount { text-align: right; }
.ti-amount strong { display: block; font-size: 0.9rem; }
.tx-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px 0 2px; border-top: 1px solid var(--gray-100); margin-top: 4px; }
.btn-page { display: inline-flex; align-items: center; gap: 4px; padding: 6px 14px; border-radius: 6px; font-size: 0.82rem; font-weight: 600; color: var(--primary); background: var(--primary-light); text-decoration: none; transition: background 0.15s; }
.btn-page:hover { background: var(--primary); color: #fff; }
.btn-page.disabled { color: var(--gray-300); background: var(--gray-100); pointer-events: none; }
.tx-page-info { font-size: 0.82rem; color: var(--gray-400); }

/* ============================================================
   DIRECTORY (member portal)
   ============================================================ */
.directory-page {}
.dir-search-bar { display: flex; gap: 10px; flex-wrap: wrap; background: var(--white); padding: 14px; border-radius: var(--radius); border: 1px solid var(--gray-200); margin-bottom: 24px; align-items: center; }
.dir-search-input { flex: 1; min-width: 200px; display: flex; align-items: center; gap: 8px; background: var(--gray-100); border-radius: 8px; padding: 8px 12px; }
.dir-search-input i { color: var(--gray-400); flex-shrink: 0; }
.dir-search-input input { background: none; border: none; outline: none; font-size: 0.875rem; width: 100%; font-family: var(--font); color: var(--dark); }
.dir-filter-select, .dir-filter-input { padding: 8px 12px; border: 1.5px solid var(--gray-200); border-radius: 8px; font-size: 0.85rem; color: var(--dark); font-family: var(--font); background: var(--white); }
.dir-filter-sm { width: 80px; }
.dir-meta { margin-bottom: 16px; font-size: 0.875rem; color: var(--gray-500); }
.member-dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.dir-card { background: var(--white); border-radius: var(--radius); border: 1px solid var(--gray-200); overflow: hidden; transition: all 0.2s; display: flex; flex-direction: column; }
.dir-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.dir-card-header { padding: 16px; position: relative; text-align: center; }
.dir-logo { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; margin: 0 auto; }
.dir-logo-placeholder { width: 64px; height: 64px; border-radius: 10px; background: var(--primary); color: var(--white); font-size: 1.4rem; font-weight: 800; display: flex; align-items: center; justify-content: center; margin: 0 auto; }
.dir-featured-badge { position: absolute; top: 12px; right: 12px; background: var(--accent); color: var(--white); font-size: 1rem; }
.dir-card-body { padding: 0 16px 16px; flex: 1; }
.dir-card-body h3 { font-size: 0.9rem; margin-bottom: 4px; }
.dir-card-body h3 a { color: var(--dark); }
.dir-category { font-size: 0.75rem; color: var(--gray-400); display: flex; align-items: center; gap: 4px; margin-bottom: 4px; }
.dir-location { font-size: 0.75rem; color: var(--gray-400); display: flex; align-items: center; gap: 4px; margin-bottom: 6px; }
.dir-desc { font-size: 0.78rem; color: var(--gray-500); line-height: 1.5; margin-bottom: 8px; }
.dir-rating { font-size: 0.8rem; color: var(--accent); display: flex; align-items: center; gap: 4px; }
.dir-rating span { color: var(--gray-500); }
.dir-card-footer { padding: 10px 16px; border-top: 1px solid var(--gray-100); display: flex; gap: 6px; align-items: center; }
.fav-btn { width: 32px; height: 32px; padding: 0; border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.fav-btn .bi-heart-fill { color: var(--danger); }

/* ============================================================
   BULLETIN BOARD
   ============================================================ */
.category-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.pill { display: inline-block; padding: 5px 14px; border-radius: 20px; font-size: 0.78rem; font-weight: 600; background: var(--gray-100); color: var(--gray-600); text-decoration: none; transition: all 0.15s; cursor: pointer; border: 1.5px solid transparent; }
.pill:hover { background: var(--primary-light); color: var(--primary); text-decoration: none; }
.pill.active { background: var(--primary); color: var(--white); }
.pill-announcement { background: #dbeafe; color: #1d4ed8; }
.pill-opportunity { background: #fef3c7; color: #92400e; }
.pill-partnership { background: #ede9fe; color: #7c3aed; }
.pill-vendor { background: #d1fae5; color: #065f46; }
.pill-job { background: #ecfdf5; color: #065f46; }
.pill-promotion { background: #fce7f3; color: #9d174d; }
.search-bar-simple { display: flex; gap: 10px; margin-bottom: 20px; }
.search-input-wrap { flex: 1; display: flex; align-items: center; gap: 8px; background: var(--white); border: 1.5px solid var(--gray-200); border-radius: 8px; padding: 8px 14px; }
.search-input-wrap i { color: var(--gray-400); font-size: 0.85rem; flex-shrink: 0; }
.search-input-wrap input { background: none; border: none; outline: none; font-size: 0.875rem; font-family: var(--font); width: 100%; }
.bulletin-feed { display: flex; flex-direction: column; gap: 0; background: var(--white); border-radius: var(--radius); border: 1px solid var(--gray-200); overflow: hidden; }
.bulletin-post { padding: 18px; border-bottom: 1px solid var(--gray-100); }
.bulletin-post:last-child { border-bottom: none; }
.bp-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.bp-org-info { display: flex; align-items: center; gap: 10px; }
.bp-org-logo { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; }
.bp-org-avatar { width: 36px; height: 36px; border-radius: 8px; background: var(--primary); color: var(--white); font-weight: 700; font-size: 0.85rem; display: flex; align-items: center; justify-content: center; }
.bp-org-name { font-size: 0.875rem; font-weight: 700; color: var(--dark); display: block; }
.bp-time { font-size: 0.75rem; color: var(--gray-400); }
.bp-category { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 4px 10px; border-radius: 12px; }
.bp-body { display: block; text-decoration: none; margin-bottom: 10px; }
.bp-body h3 { font-size: 0.95rem; color: var(--dark); margin-bottom: 6px; }
.bp-body p { font-size: 0.85rem; color: var(--gray-500); line-height: 1.5; }
.bp-pin { float: right; color: var(--primary); font-size: 0.85rem; }
.bp-footer { display: flex; align-items: center; gap: 14px; }
.bp-stat { display: flex; align-items: center; gap: 5px; font-size: 0.78rem; color: var(--gray-400); }
.bp-reply-btn { margin-left: auto; }
.page-actions { display: flex; justify-content: flex-end; margin-bottom: 20px; gap: 10px; }

/* ============================================================
   FORMS (member portal)
   ============================================================ */
.form-page { max-width: 720px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--gray-500); font-size: 0.875rem; margin-bottom: 20px; text-decoration: none; }
.back-link:hover { color: var(--primary); }
.form-section-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gray-400); margin: 4px 0 -4px; }
.category-select-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cat-select-item { cursor: pointer; }
.cat-select-item input { display: none; }
.csi-inner { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm); font-size: 0.78rem; font-weight: 600; color: var(--gray-700); text-align: center; transition: all 0.15s; }
.cat-select-item input:checked + .csi-inner { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.csi-inner i { font-size: 1.1rem; }

/* ============================================================
   EVENTS (member portal)
   ============================================================ */
.type-filter-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.events-member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.event-member-card { background: var(--white); border-radius: var(--radius); border: 1px solid var(--gray-200); overflow: hidden; display: flex; flex-direction: column; transition: all 0.2s; }
.event-member-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.emc-banner { height: 130px; background-size: cover; background-position: center; background-color: var(--primary-light); position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 10px; }
.emc-banner-default { background: linear-gradient(135deg, var(--primary-light), #dbeafe); }
.emc-type-badge { background: rgba(255,255,255,0.9); color: var(--primary); font-size: 0.7rem; font-weight: 700; padding: 3px 8px; border-radius: 4px; align-self: flex-start; text-transform: capitalize; }
.emc-free-badge { background: rgba(16,185,129,0.9); color: var(--white); font-size: 0.7rem; font-weight: 700; padding: 3px 8px; border-radius: 4px; align-self: flex-end; }
.emc-price-badge { background: rgba(147,51,234,0.9); color: var(--white); font-size: 0.7rem; font-weight: 700; padding: 3px 8px; border-radius: 4px; align-self: flex-end; }
.emc-body { padding: 14px; flex: 1; }
.emc-date { font-size: 0.75rem; color: var(--gray-400); margin-bottom: 6px; display: flex; align-items: center; gap: 5px; }
.emc-body h3 { font-size: 0.9rem; color: var(--dark); margin-bottom: 6px; line-height: 1.3; }
.emc-body h3 a { color: var(--dark); }
.emc-location, .emc-host { font-size: 0.75rem; color: var(--gray-400); display: flex; align-items: center; gap: 4px; margin-bottom: 3px; }
.emc-stats { display: flex; gap: 10px; font-size: 0.75rem; color: var(--gray-400); margin-top: 8px; }
.emc-footer { padding: 10px 14px; border-top: 1px solid var(--gray-100); }

/* ============================================================
   PRESS RELEASES
   ============================================================ */
.pr-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.pr-stat-card { background: var(--white); border-radius: var(--radius); padding: 16px; border: 1px solid var(--gray-200); text-align: center; }
.prs-num { font-size: 1.6rem; font-weight: 800; color: var(--primary); }
.prs-label { font-size: 0.75rem; color: var(--gray-500); margin-top: 2px; }
.pr-list { display: flex; flex-direction: column; gap: 0; background: var(--white); border-radius: var(--radius); border: 1px solid var(--gray-200); overflow: hidden; }
.pr-item { display: flex; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--gray-100); align-items: flex-start; }
.pr-item:last-child { border-bottom: none; }
.pr-thumb { width: 80px; height: 60px; border-radius: 8px; background-size: cover; background-position: center; flex-shrink: 0; }
.pr-thumb-placeholder { background: var(--primary-light); display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 1.5rem; }
.pr-body { flex: 1; min-width: 0; }
.pr-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.pr-date, .pr-views { font-size: 0.75rem; color: var(--gray-400); }
.pr-views { display: flex; align-items: center; gap: 4px; }
.pr-body h3 { font-size: 0.9rem; margin-bottom: 4px; }
.pr-body h3 a { color: var(--dark); }
.pr-body p { font-size: 0.8rem; color: var(--gray-500); }
.pr-rejection { font-size: 0.78rem; color: var(--danger); background: #fee2e2; border-radius: 6px; padding: 6px 10px; margin-top: 6px; display: flex; align-items: center; gap: 6px; }
.pr-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }

/* ============================================================
   SOCIAL MEDIA
   ============================================================ */
.social-stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 24px; }
.social-stat { background: var(--white); border-radius: var(--radius); padding: 14px 16px; border: 1px solid var(--gray-200); display: flex; align-items: center; gap: 12px; }
.social-stat i { font-size: 1.3rem; flex-shrink: 0; }
.ss-num { font-size: 1.3rem; font-weight: 800; color: var(--dark); line-height: 1; }
.ss-label { font-size: 0.72rem; color: var(--gray-500); }
.integration-note { display: flex; align-items: flex-start; gap: 10px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: var(--radius); padding: 14px 16px; margin-bottom: 20px; font-size: 0.85rem; color: var(--primary-dark); }
.integration-note i { font-size: 1.2rem; flex-shrink: 0; margin-top: 1px; }
.social-feed { display: flex; flex-direction: column; gap: 0; background: var(--white); border-radius: var(--radius); border: 1px solid var(--gray-200); overflow: hidden; }
.social-item { padding: 16px 18px; border-bottom: 1px solid var(--gray-100); }
.social-item:last-child { border-bottom: none; }
.si-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.si-type { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 3px 8px; border-radius: 10px; }
.si-type-news { background: #dbeafe; color: var(--primary); }
.si-type-product { background: #ede9fe; color: #7c3aed; }
.si-type-event { background: #fef3c7; color: #92400e; }
.si-type-announcement { background: #d1fae5; color: #065f46; }
.si-type-promotion { background: #fce7f3; color: #9d174d; }
.si-date { font-size: 0.75rem; color: var(--gray-400); margin-left: auto; }
.si-delete { color: var(--danger); }
.social-item h4 { font-size: 0.9rem; margin-bottom: 4px; }
.social-item p { font-size: 0.85rem; color: var(--gray-500); margin-bottom: 8px; }
.si-image-preview { width: 100%; max-height: 120px; border-radius: 8px; overflow: hidden; margin-bottom: 8px; }
.si-image-preview img { width: 100%; height: 100%; object-fit: cover; }
.si-platforms { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.platform-badge { font-size: 0.72rem; font-weight: 600; padding: 3px 8px; border-radius: 4px; display: flex; align-items: center; gap: 4px; text-transform: capitalize; }
.platform-facebook { background: #dbeafe; color: #1d4ed8; }
.platform-instagram { background: #fce7f3; color: #9d174d; }
.platform-linkedin { background: #e0f2fe; color: #0369a1; }
.platform-twitter { background: var(--gray-100); color: var(--gray-700); }
.si-analytics { display: flex; gap: 16px; font-size: 0.78rem; color: var(--gray-500); }
.si-analytics span { display: flex; align-items: center; gap: 5px; }
.si-rejection { font-size: 0.78rem; color: var(--danger); background: #fee2e2; border-radius: 6px; padding: 6px 10px; margin-top: 6px; display: flex; align-items: center; gap: 6px; }

/* ============================================================
   LOYALTY PROGRAMS
   ============================================================ */
.programs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.program-card { background: var(--white); border-radius: var(--radius); padding: 20px; border: 1px solid var(--gray-200); text-decoration: none; color: inherit; transition: all 0.2s; display: block; }
.program-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--primary); text-decoration: none; }
.pc-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.pc-type-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--primary-light); color: var(--primary); font-size: 1.2rem; display: flex; align-items: center; justify-content: center; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-active { background: var(--success); }
.status-paused { background: var(--warning); }
.status-ended { background: var(--gray-300); }
.program-card h3 { font-size: 0.95rem; margin-bottom: 4px; }
.pc-type { font-size: 0.75rem; color: var(--gray-400); text-transform: capitalize; margin-bottom: 12px; }
.pc-stats { display: flex; flex-direction: column; gap: 4px; font-size: 0.78rem; color: var(--gray-500); }
.pc-stats span { display: flex; align-items: center; gap: 5px; }
.pc-footer { margin-top: 12px; }

/* ============================================================
   AGREEMENTS
   ============================================================ */
.agreements-list { display: flex; flex-direction: column; gap: 0; background: var(--white); border-radius: var(--radius); border: 1px solid var(--gray-200); overflow: hidden; }
.agreement-item { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--gray-100); text-decoration: none; color: inherit; transition: background 0.15s; }
.agreement-item:last-child { border-bottom: none; }
.agreement-item:hover { background: var(--gray-100); }
.ai-icon { width: 40px; height: 40px; border-radius: 8px; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.ai-body { flex: 1; min-width: 0; }
.ai-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.ai-header h4 { font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-meta { display: flex; gap: 14px; flex-wrap: wrap; }
.ai-meta span { font-size: 0.75rem; color: var(--gray-400); display: flex; align-items: center; gap: 4px; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.ai-arrow { color: var(--gray-300); font-size: 0.875rem; flex-shrink: 0; }
.templates-section { margin-top: 32px; }
.templates-section h3 { font-size: 0.95rem; margin-bottom: 14px; }
.templates-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.template-card { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--white); border: 1px solid var(--gray-200); border-radius: 8px; font-size: 0.82rem; font-weight: 500; text-decoration: none; color: var(--gray-700); transition: all 0.15s; }
.template-card:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.template-card i { color: var(--primary); font-size: 1rem; }
.tc-type { margin-left: auto; font-size: 0.7rem; color: var(--gray-400); text-transform: capitalize; }

/* ============================================================
   COMMUNITY / NETWORKING
   ============================================================ */
.community-page {}
.community-tabs { display: flex; gap: 0; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; }
.ctab { flex: 1; padding: 11px; background: none; border: none; font-size: 0.82rem; font-weight: 600; cursor: pointer; color: var(--gray-500); transition: all 0.15s; font-family: var(--font); white-space: nowrap; }
.ctab.active { background: var(--primary); color: var(--white); }
.ctab:hover:not(.active) { background: var(--gray-100); }
.ctab-content { display: none; }
.ctab-content.active { display: block; }
.section-title { font-size: 0.95rem; margin-bottom: 14px; color: var(--dark); }
.tab-actions { display: flex; justify-content: flex-end; margin-bottom: 14px; }
.connections-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 24px; }
.connection-card { text-align: center; padding: 16px 12px; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); text-decoration: none; color: inherit; transition: all 0.15s; display: block; }
.connection-card:hover { border-color: var(--primary); text-decoration: none; }
.conn-logo { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; margin: 0 auto 10px; display: block; }
.conn-logo-placeholder { width: 52px; height: 52px; border-radius: 10px; background: var(--primary); color: var(--white); font-size: 1.1rem; font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; }
.connection-card h4 { font-size: 0.82rem; margin-bottom: 6px; }
.groups-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.group-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 18px; }
.gc-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--primary-light); color: var(--primary); font-size: 1.1rem; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.group-card h4 { font-size: 0.875rem; margin-bottom: 6px; }
.group-card h4 a { color: var(--dark); }
.group-card p { font-size: 0.78rem; color: var(--gray-500); margin-bottom: 8px; line-height: 1.4; }
.gc-meta { font-size: 0.75rem; color: var(--gray-400); display: flex; gap: 8px; }
.empty-state-sm { text-align: center; padding: 32px 16px; color: var(--gray-400); font-size: 0.85rem; }
.empty-state-sm i { font-size: 2rem; display: block; margin-bottom: 8px; }
.messages-preview { display: flex; flex-direction: column; gap: 0; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; }
.msg-preview { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--gray-100); position: relative; }
.msg-preview:last-child { border-bottom: none; }
.msg-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: var(--white); font-size: 0.85rem; font-weight: 700; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.msg-avatar img { width: 100%; height: 100%; object-fit: cover; }
.msg-body { flex: 1; min-width: 0; }
.msg-header { display: flex; justify-content: space-between; margin-bottom: 3px; }
.msg-sender { font-size: 0.82rem; font-weight: 700; }
.msg-time { font-size: 0.72rem; color: var(--gray-400); }
.msg-preview-text { font-size: 0.78rem; color: var(--gray-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unread-dot { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.suggestions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.suggestion-card { display: flex; align-items: center; gap: 12px; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 14px; }
.sug-logo { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.sug-logo-placeholder { width: 44px; height: 44px; border-radius: 10px; background: var(--primary); color: var(--white); font-size: 1rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sug-info { flex: 1; min-width: 0; }
.sug-info h4 { font-size: 0.85rem; margin-bottom: 2px; }
.sug-info h4 a { color: var(--dark); }
.sug-category { font-size: 0.75rem; color: var(--gray-400); }
.sug-location { font-size: 0.72rem; color: var(--gray-400); display: flex; align-items: center; gap: 4px; }
.message-compose { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 20px; }
.message-compose h3 { font-size: 0.95rem; margin-bottom: 16px; }
.message-compose .form-group { margin-bottom: 14px; }

/* ============================================================
   NOTIFICATIONS
   ============================================================ */
.notifications-list { display: flex; flex-direction: column; gap: 0; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); overflow: hidden; }
.notif-item { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--gray-100); transition: background 0.15s; text-decoration: none; color: inherit; }
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--gray-50); text-decoration: none; }
.notif-unread { background: var(--primary-light); }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex-shrink: 0; margin-top: 6px; }
.notif-icon { width: 36px; height: 36px; border-radius: 8px; background: var(--gray-100); color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 0.9rem; }
.notif-body { flex: 1; }
.notif-title { font-size: 0.875rem; font-weight: 600; color: var(--dark); margin-bottom: 3px; }
.notif-msg { font-size: 0.8rem; color: var(--gray-500); margin-bottom: 4px; }
.notif-time { font-size: 0.72rem; color: var(--gray-400); }
.notif-link-btn { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 0.85rem; }

/* ============================================================
   MODALS
   ============================================================ */
.modal { position: fixed; inset: 0; z-index: 500; display: flex; align-items: center; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.modal-content { position: relative; background: var(--white); border-radius: 16px; box-shadow: var(--shadow-lg); z-index: 1; width: 100%; max-height: 90vh; overflow-y: auto; }
.modal-sm { max-width: 420px; }
.modal-md { max-width: 600px; }
.modal-lg { max-width: 800px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--gray-200); }
.modal-header h3 { font-size: 1rem; }
.modal-close { background: none; border: none; font-size: 1.1rem; cursor: pointer; color: var(--gray-400); padding: 4px; border-radius: 6px; }
.modal-close:hover { background: var(--gray-100); color: var(--dark); }
.modal-body { padding: 24px; }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; }

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
#toastContainer { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 0.875rem; font-weight: 500; max-width: 360px; animation: slideIn 0.3s ease; }
.toast-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.toast-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.toast-info { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ============================================================
   BUTTONS (portal)
   ============================================================ */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: 8px; font-size: 0.875rem; font-weight: 600; cursor: pointer; border: 2px solid transparent; transition: all 0.15s; text-decoration: none; white-space: nowrap; font-family: var(--font); }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: var(--white); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: var(--white); }
.btn-outline-primary { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); color: var(--white); }
.btn-ghost { background: transparent; color: var(--gray-700); border-color: transparent; }
.btn-ghost:hover { background: var(--gray-100); }
.btn-success { background: var(--success); color: var(--white); border-color: var(--success); }
.btn-danger { background: var(--danger); color: var(--white); border-color: var(--danger); }
.btn-warning { background: var(--warning); color: var(--white); border-color: var(--warning); }
.btn-sm { padding: 6px 12px; font-size: 0.78rem; border-radius: 6px; }
.btn-xs { padding: 3px 8px; font-size: 0.72rem; border-radius: 5px; border-width: 1px; }
.btn-lg { padding: 12px 24px; font-size: 0.95rem; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.text-muted { color: var(--gray-400); font-size: 0.875rem; }

/* ============================================================
   BADGES
   ============================================================ */
.badge { display: inline-block; padding: 3px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: 700; text-transform: capitalize; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-secondary { background: var(--gray-100); color: var(--gray-600); }
.badge-info { background: #dbeafe; color: #1e40af; }

/* ============================================================
   EMPTY STATES
   ============================================================ */
.empty-state { text-align: center; padding: 60px 24px; }
.empty-state i { font-size: 3rem; color: var(--gray-200); margin-bottom: 16px; display: block; }
.empty-state h3 { color: var(--gray-600); margin-bottom: 8px; font-size: 1rem; }
.empty-state p { color: var(--gray-400); font-size: 0.875rem; margin-bottom: 20px; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.page-btn { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--gray-200); background: var(--white); color: var(--gray-700); font-size: 0.82rem; cursor: pointer; transition: all 0.15s; text-decoration: none; }
.page-btn:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.page-btn.active { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* ============================================================
   ERROR PAGES
   ============================================================ */
.error-page { min-height: 60vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 40px; }
.error-code { font-size: 6rem; font-weight: 900; color: var(--primary); opacity: 0.15; line-height: 1; margin-bottom: -20px; }
.error-content h1 { margin-bottom: 10px; }
.error-content p { color: var(--gray-500); margin-bottom: 20px; }
.error-actions { display: flex; gap: 10px; justify-content: center; }

/* ============================================================
   ALERT
   ============================================================ */
.alert { padding: 12px 16px; border-radius: 8px; font-size: 0.875rem; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-success { background: #d1fae5; color: #065f46; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  :root { --sidebar-width: 0px; }
  .sidebar { transform: translateX(-260px); width: 260px; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: flex; }
  .sidebar-overlay.open { display: block; }
  .member-main { margin-left: 0; }
  .topbar-toggle { display: flex; }
  .topbar-search { display: none; }
  .billing-grid { grid-template-columns: 1fr; }
  .billing-status-card { grid-row: span 1; }
  .pr-stats { grid-template-columns: repeat(2, 1fr); }
  .social-stats-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .member-content { padding: 16px; }
  .dash-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .community-tabs { overflow-x: auto; }
  .category-select-grid { grid-template-columns: repeat(2, 1fr); }
  .member-dir-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .events-member-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .pr-stats { grid-template-columns: repeat(2, 1fr); }
  .social-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .programs-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   TRIAL BANNER (member portal)
   ============================================================ */
.trial-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 20px; border-radius: var(--radius); margin-bottom: 20px;
  flex-wrap: wrap;
}
.trial-info    { background: linear-gradient(135deg, #1e3a8a, #1a56db); color: var(--white); }
.trial-warning { background: linear-gradient(135deg, #92400e, #b45309); color: var(--white); }
.trial-urgent  { background: linear-gradient(135deg, #991b1b, #dc2626); color: var(--white); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.85} }
.tb-left { display: flex; align-items: flex-start; gap: 14px; flex: 1; }
.tb-left i { font-size: 1.6rem; flex-shrink: 0; margin-top: 2px; }
.tb-left strong { display: block; font-size: 1rem; font-weight: 700; margin-bottom: 3px; }
.tb-left p { font-size: .82rem; opacity: .85; margin: 0; }
.tb-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.tb-expiry { font-size: .72rem; opacity: .7; }
.btn-white { background: var(--white); color: var(--primary); border: none; font-weight: 700; }
.btn-white:hover { background: #f3f4f6; color: var(--primary-dark); }
.trial-progress { height: 6px; background: rgba(255,255,255,.2); border-radius: 3px; overflow: hidden; }
.trial-progress-bar { height: 100%; background: linear-gradient(90deg, #10b981, #f59e0b); border-radius: 3px; transition: width .5s; }

/* Trial badge */
.membership-badge.trial { background: #ede9fe; color: #7c3aed; }
.ms-trial { background: #ede9fe; color: #7c3aed; }
.badge-trial { background: #ede9fe; color: #7c3aed; }

/* Support ticket member side */
.member-support-list { display:flex; flex-direction:column; gap:0; background:var(--white); border:1px solid var(--gray-200); border-radius:var(--radius); overflow:hidden; }
.msl-item { display:flex; align-items:center; gap:12px; padding:12px 16px; border-bottom:1px solid var(--gray-100); text-decoration:none; color:inherit; transition:background .15s; }
.msl-item:last-child { border-bottom:none; }
.msl-item:hover { background:var(--gray-100); }
.msl-number { font-family:monospace; font-size:.78rem; color:var(--primary); font-weight:700; white-space:nowrap; }
.msl-subject { font-size:.85rem; font-weight:600; flex:1; }
.msl-time { font-size:.72rem; color:var(--gray-400); white-space:nowrap; }

/* Announcement display in member portal */
.portal-announcement { display:flex; align-items:flex-start; gap:12px; padding:12px 16px; border-radius:var(--radius-sm); margin-bottom:12px; font-size:.875rem; }
.portal-announcement.type-info    { background:#dbeafe; color:#1e40af; border-left:3px solid #1a56db; }
.portal-announcement.type-success { background:#d1fae5; color:#065f46; border-left:3px solid #10b981; }
.portal-announcement.type-warning { background:#fef3c7; color:#92400e; border-left:3px solid #f59e0b; }
.portal-announcement.type-danger  { background:#fee2e2; color:#991b1b; border-left:3px solid #ef4444; }
.portal-announcement.type-feature { background:#ede9fe; color:#5b21b6; border-left:3px solid #9333ea; }
.ann-dismiss { margin-left:auto; background:none; border:none; cursor:pointer; opacity:.6; font-size:.9rem; padding:2px; }
.ann-dismiss:hover { opacity:1; }

/* CRM SSO button in member portal */
.crm-access-btn { display:flex; align-items:center; gap:10px; padding:14px 18px; background:linear-gradient(135deg,#1e3a8a,#1a56db); border-radius:var(--radius); color:var(--white); text-decoration:none; font-weight:600; transition:all .2s; }
.crm-access-btn:hover { transform:translateY(-2px); box-shadow:var(--shadow-lg); text-decoration:none; color:var(--white); }
.crm-access-btn i { font-size:1.4rem; }

/* Text helpers */
.text-danger  { color:#ef4444 !important; }
.text-warning { color:#f59e0b !important; }
.text-success { color:#10b981 !important; }
.text-muted   { color:#9ca3af !important; }

/* ── Inline Stripe card element ───────────────────────────────── */
.stripe-card-box { border:1.5px solid #d1d5db; border-radius:8px; padding:12px 14px; background:#fff; transition:border-color .2s; }
.stripe-card-box.StripeElement--focus { border-color:#1a56db; box-shadow:0 0 0 3px rgba(26,86,219,.1); }
.stripe-card-box.StripeElement--invalid { border-color:#dc2626; }
