/* SVG Icon System */
.icon-svg { display: inline-flex; align-items: center; justify-content: center; width: 1em; height: 1em; vertical-align: -0.125em; }
.icon-svg svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Page-specific styles matching club-accounts/opportunities/projects */
.contacts-page { min-height: 100vh; background: var(--bg-cream); }

/* Main Container */
.dashboard-container { max-width: 1400px; margin: 0 auto; padding: 32px; }

/* Stats Row */
.stats-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 24px; }
@media (max-width: 1200px) { .stats-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .stats-row { grid-template-columns: repeat(2, 1fr); } }
.stat-card { background: var(--bg-white); border: 1px solid var(--border-light); border-radius: 8px; padding: 20px; transition: all 0.2s ease; position: relative; cursor: pointer; }
.stat-card:hover { border-color: var(--gold-light); box-shadow: var(--shadow-gold); }
.stat-card.primary::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: linear-gradient(180deg, var(--gold-primary) 0%, var(--gold-light) 100%); border-radius: 8px 0 0 8px; }
.stat-value { font-family: 'big-caslon-fb', serif; font-size: 28px; font-weight: 500; color: var(--text-dark); }
.stat-value.gold { color: var(--gold-primary); }
.stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-light); margin-top: 4px; }

/* View Tabs */
.view-tabs { display: flex; gap: 8px; margin-bottom: 24px; }
.view-tab { padding: 10px 20px; background: var(--bg-white); border: 1px solid var(--border-light); border-radius: 6px; font-family: 'articulat-cf', sans-serif; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-medium); cursor: pointer; transition: all 0.2s ease; }
.view-tab:hover { border-color: var(--gold-primary); color: var(--gold-primary); }
.view-tab.active { background: var(--gold-primary); border-color: var(--gold-primary); color: white; }

/* Main Card */
.main-card { background: var(--bg-white); border: 1px solid var(--border-light); border-radius: 8px; overflow: hidden; margin-bottom: 24px; }

/* Section Headers */
.section-header-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.numbered-indicator { width: 24px; height: 24px; border-radius: 50%; background: var(--gold-primary); color: white; display: flex; align-items: center; justify-content: center; font-family: 'big-caslon-fb', serif; font-size: 12px; font-weight: 500; }
.section-header { font-family: 'big-caslon-fb', serif; font-size: 18px; font-weight: 500; color: var(--text-dark); margin: 0; }
.section-divider { flex: 1; height: 1px; background: var(--border-light); }

/* Filter Bar */
.filter-bar { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border-light); background: var(--bg-cream); flex-wrap: wrap; }
.filter-bar input, .filter-bar select { padding: 10px 14px; border: 1px solid var(--border-light); border-radius: 6px; font-family: 'articulat-cf', sans-serif; font-size: 14px; background: white; }
.filter-bar input { flex: 1; min-width: 200px; max-width: 350px; }
.filter-bar select { min-width: 120px; }
.filter-bar input:focus, .filter-bar select:focus { outline: none; border-color: var(--gold-primary); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 6px; font-family: 'articulat-cf', sans-serif; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; cursor: pointer; transition: all 0.2s ease; text-decoration: none; border: 1px solid transparent; }
.btn-gold { background: linear-gradient(135deg, var(--gold-primary), var(--gold-light)); color: white; border: none; }
.btn-gold:hover { box-shadow: 0 4px 12px rgba(160, 139, 91, 0.3); transform: translateY(-1px); }
.btn-outline { background: transparent; border: 1px solid var(--border-light); color: var(--text-medium); }
.btn-outline:hover { border-color: var(--gold-primary); color: var(--gold-primary); }
.btn-sm { padding: 6px 12px; font-size: 11px; }

/* Table */
.contacts-table { width: 100%; border-collapse: collapse; }
.contacts-table th { font-family: 'articulat-cf', sans-serif; text-transform: uppercase; letter-spacing: 0.1em; font-size: 11px; font-weight: 600; color: var(--text-light); text-align: left; padding: 14px 16px; background: var(--bg-cream); border-bottom: 2px solid var(--gold-primary); cursor: pointer; }
.contacts-table th:hover { color: var(--gold-primary); }
.contacts-table td { padding: 14px 16px; border-bottom: 1px solid var(--border-light); font-size: 14px; }
.contacts-table tbody tr { cursor: pointer; }
.contacts-table tbody tr:hover { background: var(--gold-50); }

/* Contact Avatar */
.contact-avatar { width: 40px; height: 40px; border-radius: 8px; background: linear-gradient(135deg, var(--gold-primary), var(--gold-light)); display: flex; align-items: center; justify-content: center; color: white; font-family: 'big-caslon-fb', serif; font-size: 16px; font-weight: 500; overflow: hidden; }
.contact-name { display: flex; align-items: center; gap: 12px; }
.contact-info h4 { font-family: 'articulat-cf', sans-serif; font-size: 14px; font-weight: 600; color: var(--text-dark); margin: 0; }
.contact-info p { font-size: 12px; color: var(--text-light); margin: 2px 0 0 0; }

/* Tags */
.tag { display: inline-flex; padding: 3px 10px; background: var(--gold-100); color: var(--gold-dark); border-radius: 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-right: 4px; margin-bottom: 4px; }

/* Interests Filter Panel */
.interests-filter-panel { background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 8px; padding: 16px; margin: 0 20px 16px 20px; }

/* Pagination */
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; background: var(--bg-cream); }
.pagination-info { font-size: 13px; color: var(--text-light); }
.pagination-buttons { display: flex; gap: 4px; }
.pagination-btn { padding: 8px 12px; background: var(--bg-white); border: 1px solid var(--border-light); border-radius: 4px; font-size: 12px; cursor: pointer; transition: all 0.2s ease; }
.pagination-btn:hover:not(:disabled) { border-color: var(--gold-primary); color: var(--gold-primary); }
.pagination-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.pagination-btn.active { background: var(--gold-primary); border-color: var(--gold-primary); color: white; }

/* Modal */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); z-index: 1000; align-items: center; justify-content: center; }
.modal-overlay.show { display: flex; }
.modal-container { background: var(--bg-white); border: 1px solid var(--border-light); border-radius: 12px; width: 90%; max-width: 900px; max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border-light); background: var(--bg-cream); }
.modal-header-left { display: flex; align-items: center; gap: 16px; }
.modal-avatar { width: 56px; height: 56px; border-radius: 10px; background: linear-gradient(135deg, var(--gold-primary), var(--gold-light)); display: flex; align-items: center; justify-content: center; color: white; font-size: 24px; font-family: 'big-caslon-fb', serif; overflow: hidden; flex-shrink: 0; }
.modal-title { font-family: 'big-caslon-fb', serif; font-size: 22px; font-weight: 500; margin: 0; color: var(--text-dark); }
.modal-subtitle { font-size: 13px; color: var(--text-light); margin: 4px 0 0 0; }
.modal-close { width: 36px; height: 36px; border: 1px solid var(--border-light); background: var(--bg-white); border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; font-size: 20px; color: var(--text-light); }
.modal-close:hover { border-color: var(--gold-primary); color: var(--gold-primary); }
.modal-body { flex: 1; overflow-y: auto; padding: 24px; background: var(--bg-cream); }

/* Form Sections in Modal */
.form-section { background: var(--bg-white); border: 1px solid var(--border-light); border-radius: 8px; padding: 20px; margin-bottom: 16px; }
.form-section.gold { border-left: 4px solid var(--gold-primary); }
.form-section-title { font-family: 'big-caslon-fb', serif; font-size: 16px; font-weight: 500; color: var(--text-dark); margin: 0 0 16px 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-light); }
.form-value { font-size: 14px; color: var(--text-dark); }

/* Expandable Section */
.expandable-section { border: 1px solid var(--border-light); border-radius: 8px; overflow: hidden; margin-bottom: 16px; }
.expandable-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; background: var(--bg-white); cursor: pointer; transition: background 0.2s; }
.expandable-header:hover { background: var(--gold-50); }
.expandable-title { font-family: 'big-caslon-fb', serif; font-size: 16px; font-weight: 500; color: var(--text-dark); margin: 0; display: flex; align-items: center; gap: 10px; }
.expandable-toggle { width: 28px; height: 28px; border-radius: 50%; background: var(--bg-cream); border: 1px solid var(--border-light); display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--text-medium); transition: all 0.2s; }
.expandable-toggle.expanded { background: var(--gold-primary); border-color: var(--gold-primary); color: white; transform: rotate(180deg); }
.expandable-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; }
.expandable-content.expanded { max-height: 500px; }
.expandable-content-inner { padding: 0 20px 20px 20px; }

/* Modal Tabs */
.modal-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border-light); background: var(--bg-white); }
.modal-tab { flex: 1; padding: 14px 20px; font-family: 'articulat-cf', sans-serif; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-light); background: transparent; border: none; cursor: pointer; transition: all 0.2s; position: relative; }
.modal-tab:hover { color: var(--gold-primary); background: var(--gold-50); }
.modal-tab.active { color: var(--gold-primary); }
.modal-tab.active::after { content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; background: var(--gold-primary); }

/* Social Links */
.social-links { display: flex; gap: 8px; flex-wrap: wrap; }
.social-link { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; background: var(--bg-cream); border: 1px solid var(--border-light); border-radius: 6px; font-size: 12px; font-weight: 500; color: var(--text-medium); text-decoration: none; transition: all 0.2s; }
.social-link:hover { border-color: var(--gold-primary); color: var(--gold-primary); background: var(--gold-50); }
.social-link svg { width: 14px; height: 14px; }

/* Club Link */
.club-link { color: var(--gold-primary); text-decoration: none; font-weight: 600; cursor: pointer; }
.club-link:hover { text-decoration: underline; }

/* Tags Display */
.tags-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-item { padding: 4px 10px; background: var(--gold-100); color: var(--gold-dark); border-radius: 4px; font-size: 11px; font-weight: 600; }

/* Engagement Stats */
.engagement-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
@media (max-width: 600px) { .engagement-stats { grid-template-columns: repeat(2, 1fr); } }
.engagement-stat { background: var(--bg-white); border: 1px solid var(--border-light); border-radius: 8px; padding: 16px; text-align: center; }
.engagement-stat-value { font-family: 'big-caslon-fb', serif; font-size: 24px; font-weight: 500; color: var(--gold-primary); }
.engagement-stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-light); margin-top: 4px; }

/* Activity Timeline */
.activity-timeline { display: flex; flex-direction: column; gap: 12px; }
.activity-item { display: flex; gap: 12px; padding: 12px; background: var(--bg-white); border: 1px solid var(--border-light); border-radius: 8px; }
.activity-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.activity-icon.email { background: #dbeafe; color: #2563eb; }
.activity-icon.click { background: #dcfce7; color: #16a34a; }
.activity-icon.visit { background: #fef3c7; color: #d97706; }
.activity-content { flex: 1; }
.activity-title { font-size: 14px; font-weight: 600; color: var(--text-dark); margin: 0; }
.activity-meta { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.no-activity { text-align: center; padding: 40px; color: var(--text-light); }

/* Toast Notification */
.toast { position: fixed; bottom: 24px; right: 24px; padding: 12px 20px; background: #10b981; color: white; border-radius: 8px; font-size: 14px; font-weight: 500; z-index: 2000; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.toast.error { background: #ef4444; }

/* Loading */
.loading-spinner { display: flex; align-items: center; justify-content: center; padding: 60px; color: var(--text-light); }

/* Edit Mode Styles */
.modal-header-actions { display: flex; gap: 8px; align-items: center; }
.btn-edit { padding: 8px 16px; font-size: 13px; font-weight: 600; border-radius: 6px; cursor: pointer; transition: all 0.2s; border: 1px solid var(--border-light); background: var(--bg-white); color: var(--text-medium); }
.btn-edit:hover { border-color: var(--gold-primary); color: var(--gold-primary); }
.btn-save { padding: 8px 16px; font-size: 13px; font-weight: 600; border-radius: 6px; cursor: pointer; transition: all 0.2s; border: none; background: var(--gold-primary); color: white; }
.btn-save:hover { background: var(--gold-dark); }
.btn-save:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-cancel { padding: 8px 16px; font-size: 13px; font-weight: 600; border-radius: 6px; cursor: pointer; transition: all 0.2s; border: 1px solid var(--border-light); background: var(--bg-white); color: var(--text-medium); }
.btn-cancel:hover { border-color: #ef4444; color: #ef4444; }

.form-input { width: 100%; padding: 8px 12px; font-size: 14px; border: 1px solid var(--border-light); border-radius: 6px; background: var(--bg-white); color: var(--text-dark); transition: border-color 0.2s; }
.form-input:focus { outline: none; border-color: var(--gold-primary); box-shadow: 0 0 0 3px var(--gold-50); }
.form-input::placeholder { color: var(--text-light); }

/* Unsubscribe Toggle */
.unsubscribe-section { background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; padding: 16px 20px; margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; }
.unsubscribe-label { font-size: 14px; font-weight: 600; color: #991b1b; }
.unsubscribe-hint { font-size: 12px; color: #b91c1c; margin-top: 4px; }
.toggle-switch { position: relative; width: 48px; height: 26px; cursor: pointer; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background: #d1d5db; border-radius: 26px; transition: all 0.3s; }
.toggle-slider:before { content: ''; position: absolute; height: 20px; width: 20px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: all 0.3s; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.toggle-switch input:checked + .toggle-slider { background: #ef4444; }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(22px); }

/* Collapsible Section Header with edit support */
.section-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; background: var(--bg-white); cursor: pointer; border-radius: 8px 8px 0 0; transition: background 0.2s; }
.section-header:hover { background: var(--gold-50); }
.section-header.collapsed { border-radius: 8px; }
.section-title { font-family: 'big-caslon-fb', serif; font-size: 16px; font-weight: 500; color: var(--text-dark); margin: 0; display: flex; align-items: center; gap: 10px; }
.section-toggle { width: 24px; height: 24px; border-radius: 50%; background: var(--bg-cream); border: 1px solid var(--border-light); display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--text-medium); transition: all 0.2s; }
.section-toggle.expanded { background: var(--gold-primary); border-color: var(--gold-primary); color: white; transform: rotate(180deg); }
.section-content { padding: 0 20px 20px 20px; background: var(--bg-white); border-radius: 0 0 8px 8px; }
.section-content.collapsed { display: none; }

.collapsible-section { border: 1px solid var(--border-light); border-radius: 8px; margin-bottom: 16px; overflow: hidden; }
.collapsible-section.gold { border-left: 4px solid var(--gold-primary); }
