/**
 * ULH Modern Frontend Styles
 * Version 5.3.0 - Complete UI Overhaul
 */

/* ============================================
   Global Variables & Reset
============================================ */
:root {
    --ulh-primary: #7c3aed;
    --ulh-primary-hover: #6d28d9;
    --ulh-primary-light: #ede9fe;
    --ulh-primary-gradient: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
    --ulh-success: #10b981;
    --ulh-success-light: #d1fae5;
    --ulh-warning: #f59e0b;
    --ulh-warning-light: #fef3c7;
    --ulh-danger: #ef4444;
    --ulh-danger-light: #fee2e2;
    --ulh-info: #3b82f6;
    --ulh-bg: #f8fafc;
    --ulh-bg-card: #ffffff;
    --ulh-text: #1e293b;
    --ulh-text-secondary: #64748b;
    --ulh-text-muted: #94a3b8;
    --ulh-border: #e2e8f0;
    --ulh-border-light: #f1f5f9;
    --ulh-radius-sm: 8px;
    --ulh-radius-md: 12px;
    --ulh-radius-lg: 16px;
    --ulh-radius-xl: 24px;
    --ulh-radius-full: 9999px;
    --ulh-shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --ulh-shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --ulh-shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --ulh-shadow-glow: 0 0 20px rgba(124,58,237,0.15);
    --ulh-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --ulh-transition: all 0.2s ease;
}

/* Dark Theme */
[data-theme="dark"],
.ulh-dashboard-modern[data-theme="dark"],
.ulh-directory-modern[data-theme="dark"],
.ulh-checkout-modern[data-theme="dark"] {
    --ulh-bg: #0a0a0f;
    --ulh-bg-card: #141419;
    --ulh-bg-card-hover: #1c1c24;
    --ulh-text: #f8fafc;
    --ulh-text-secondary: #cbd5e1;
    --ulh-text-muted: #94a3b8;
    --ulh-border: #2d2d3a;
    --ulh-border-light: #1e1e28;
    --ulh-primary: #a78bfa;
    --ulh-primary-hover: #c4b5fd;
    --ulh-primary-light: rgba(167, 139, 250, 0.15);
    --ulh-shadow-md: 0 4px 12px rgba(0,0,0,0.4);
}

/* Dark Theme Enhanced Tiles */
[data-theme="dark"] .ulh-stat-card,
[data-theme="dark"] .ulh-quick-action-card,
[data-theme="dark"] .ulh-tab-card,
[data-theme="dark"] .ulh-card {
    background: var(--ulh-bg-card) !important;
    border: 1px solid var(--ulh-border);
}

[data-theme="dark"] .ulh-stat-card:hover,
[data-theme="dark"] .ulh-quick-action-card:hover {
    background: var(--ulh-bg-card-hover) !important;
}

/* Gold Theme */
[data-theme="gold"],
.ulh-dashboard-modern[data-theme="gold"],
.ulh-directory-modern[data-theme="gold"],
.ulh-checkout-modern[data-theme="gold"] {
    --ulh-bg: #0a0a0a;
    --ulh-bg-card: #131313;
    --ulh-bg-card-hover: #1a1a1a;
    --ulh-text: #f5f0e1;
    --ulh-text-secondary: #b8960c;
    --ulh-text-muted: #8a8a8a;
    --ulh-border: #252525;
    --ulh-border-light: #1a1a1a;
    --ulh-primary: #b8960c;
    --ulh-primary-hover: #c9a227;
    --ulh-primary-light: rgba(184, 150, 12, 0.12);
    --ulh-primary-gradient: linear-gradient(135deg, #9a7d0a 0%, #c9a227 100%);
    --ulh-accent: #c9a227;
    --ulh-success: #6b9e6b;
    --ulh-warning: #c9a227;
    --ulh-shadow-md: 0 4px 12px rgba(0,0,0,0.6);
}

/* Gold Theme Enhanced Tiles */
[data-theme="gold"] .ulh-stat-card,
[data-theme="gold"] .ulh-quick-action-card,
[data-theme="gold"] .ulh-tab-card,
[data-theme="gold"] .ulh-card {
    background: var(--ulh-bg-card) !important;
    border: 1px solid var(--ulh-border);
}

[data-theme="gold"] .ulh-stat-card:hover,
[data-theme="gold"] .ulh-quick-action-card:hover {
    background: var(--ulh-bg-card-hover) !important;
    border-color: var(--ulh-primary);
}

[data-theme="gold"] .ulh-welcome-modern h1,
[data-theme="gold"] .ulh-header-modern h1 {
    background: var(--ulh-primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   MODERN DASHBOARD
============================================ */
.ulh-dashboard-modern {
    font-family: var(--ulh-font);
    background: var(--ulh-bg);
    min-height: 100vh;
    color: var(--ulh-text);
}

/* Modern Header */
.ulh-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 32px;
    background: var(--ulh-bg-card);
    border-bottom: 1px solid var(--ulh-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.ulh-welcome-modern h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    background: var(--ulh-primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ulh-tagline {
    margin: 8px 0 0;
    font-size: 16px;
    font-weight: 500;
    color: var(--ulh-text);
    opacity: 0.85;
}

[data-theme="gold"] .ulh-tagline,
[data-theme="dark"] .ulh-tagline {
    color: var(--ulh-accent, #fbbf24);
    opacity: 1;
}

[data-theme="light"] .ulh-tagline {
    color: var(--ulh-text);
    opacity: 0.8;
}

.ulh-welcome-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--ulh-primary-light, #ede9fe);
    color: var(--ulh-primary, #7c3aed);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

[data-theme="gold"] .ulh-welcome-badge {
    background: rgba(184, 150, 12, 0.2);
    color: #b8960c;
}

[data-theme="dark"] .ulh-welcome-badge {
    background: rgba(124, 58, 237, 0.2);
    color: #a78bfa;
}

.ulh-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ulh-header-actions-modern {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ulh-icon-btn {
    width: 42px;
    height: 42px;
    border: none;
    background: var(--ulh-bg);
    border-radius: var(--ulh-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--ulh-text-secondary);
    text-decoration: none;
    transition: var(--ulh-transition);
}

.ulh-icon-btn:hover {
    background: var(--ulh-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--ulh-shadow-md);
}

.ulh-profile-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 6px;
    background: var(--ulh-bg);
    border: 1px solid var(--ulh-border);
    border-radius: var(--ulh-radius-full);
    cursor: pointer;
    transition: var(--ulh-transition);
}

.ulh-profile-trigger:hover {
    border-color: var(--ulh-primary);
    box-shadow: var(--ulh-shadow-glow);
}

.ulh-avatar-modern {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--ulh-primary-light);
}

/* Modern Navigation Tabs */
.ulh-nav-modern {
    background: var(--ulh-bg-card);
    border-bottom: 1px solid var(--ulh-border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ulh-nav-scroll {
    display: flex;
    padding: 0 24px;
    gap: 4px;
    min-width: max-content;
}

.ulh-nav-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    color: var(--ulh-text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    border-bottom: 3px solid transparent;
    transition: var(--ulh-transition);
    white-space: nowrap;
}

.ulh-nav-tab:hover {
    color: var(--ulh-primary);
    background: var(--ulh-primary-light);
}

.ulh-nav-tab.active {
    color: var(--ulh-primary);
    border-bottom-color: var(--ulh-primary);
    background: linear-gradient(to bottom, transparent, var(--ulh-primary-light));
}

.ulh-nav-tab .nav-icon {
    font-size: 18px;
}

.ulh-nav-tab .nav-label {
    font-size: 14px;
}

/* Content Area */
.ulh-content-modern {
    padding: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Tab Content Header */
.ulh-tab-title {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 700;
    color: var(--ulh-text);
}

.ulh-tab-description {
    margin: 0 0 24px;
    color: var(--ulh-text-secondary);
    font-size: 15px;
}

/* ============================================
   MODERN CARDS
============================================ */
.ulh-card-modern {
    background: var(--ulh-bg-card);
    border-radius: var(--ulh-radius-lg);
    box-shadow: var(--ulh-shadow-sm);
    overflow: hidden;
    transition: var(--ulh-transition);
}

.ulh-card-modern:hover {
    box-shadow: var(--ulh-shadow-md);
}

.ulh-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--ulh-border);
}

.ulh-card-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--ulh-text);
}

.ulh-card-body {
    padding: 24px;
}

/* Stats Grid */
.ulh-stats-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.ulh-stat-card-modern {
    background: var(--ulh-bg-card);
    border-radius: var(--ulh-radius-lg);
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: var(--ulh-shadow-sm);
    transition: var(--ulh-transition);
}

.ulh-stat-card-modern:hover {
    transform: translateY(-4px);
    box-shadow: var(--ulh-shadow-md);
}

.ulh-stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--ulh-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.ulh-stat-icon.purple { background: var(--ulh-primary-light); }
.ulh-stat-icon.green { background: var(--ulh-success-light); }
.ulh-stat-icon.yellow { background: var(--ulh-warning-light); }
.ulh-stat-icon.blue { background: #dbeafe; }

.ulh-stat-content .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--ulh-text);
    line-height: 1;
    margin-bottom: 4px;
}

.ulh-stat-content .stat-label {
    font-size: 13px;
    color: var(--ulh-text-secondary);
}

/* ============================================
   MEMBER DIRECTORY - MODERN
============================================ */
.ulh-directory-modern {
    font-family: var(--ulh-font);
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

.ulh-directory-header {
    text-align: center;
    margin-bottom: 32px;
}

.ulh-directory-title h1 {
    margin: 0 0 8px;
    font-size: 32px;
    font-weight: 700;
    color: var(--ulh-text);
}

.ulh-directory-title p {
    margin: 0;
    color: var(--ulh-text-secondary);
    font-size: 16px;
}

/* Modern Search Bar */
.ulh-search-bar-modern {
    max-width: 600px;
    margin: 24px auto 0;
}

.ulh-search-form {
    display: flex;
    gap: 12px;
}

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

.ulh-search-input-wrap .dashicons {
    position: absolute;
    left: 16px;
    color: var(--ulh-text-muted);
}

.ulh-search-input-wrap input {
    width: 100%;
    padding: 14px 16px 14px 46px;
    border: 2px solid var(--ulh-border);
    border-radius: var(--ulh-radius-lg);
    font-size: 15px;
    background: var(--ulh-bg-card);
    color: var(--ulh-text);
    transition: var(--ulh-transition);
}

.ulh-search-input-wrap input:focus {
    outline: none;
    border-color: var(--ulh-primary);
    box-shadow: var(--ulh-shadow-glow);
}

.ulh-search-btn {
    padding: 14px 28px;
    background: var(--ulh-primary-gradient);
    color: white;
    border: none;
    border-radius: var(--ulh-radius-lg);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: var(--ulh-transition);
}

.ulh-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--ulh-shadow-md);
}

/* Directory Tabs */
.ulh-directory-tabs {
    display: flex;
    gap: 8px;
    padding: 16px;
    background: var(--ulh-bg-card);
    border-radius: var(--ulh-radius-lg);
    margin-bottom: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: var(--ulh-shadow-sm);
}

.ulh-directory-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--ulh-bg);
    border-radius: var(--ulh-radius-md);
    color: var(--ulh-text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    transition: var(--ulh-transition);
}

.ulh-directory-tab:hover {
    background: var(--ulh-primary-light);
    color: var(--ulh-primary);
}

.ulh-directory-tab.active {
    background: var(--ulh-primary-gradient);
    color: white;
    box-shadow: var(--ulh-shadow-md);
}

.ulh-directory-tab .tab-icon {
    font-size: 16px;
}

.ulh-directory-tab .tab-count {
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: var(--ulh-radius-full);
    font-size: 12px;
}

.ulh-directory-tab.active .tab-count {
    background: rgba(255,255,255,0.25);
}

/* Filters Bar */
.ulh-filters-bar-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.ulh-filter-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-label {
    font-size: 14px;
    color: var(--ulh-text-secondary);
}

.ulh-filter-select {
    padding: 10px 36px 10px 16px;
    border: 2px solid var(--ulh-border);
    border-radius: var(--ulh-radius-md);
    font-size: 14px;
    background: var(--ulh-bg-card);
    color: var(--ulh-text);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: var(--ulh-transition);
}

.ulh-filter-select:focus {
    outline: none;
    border-color: var(--ulh-primary);
}

.results-count {
    font-size: 14px;
    color: var(--ulh-text-muted);
}

/* Members Grid */
.ulh-members-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.ulh-member-card-modern {
    background: var(--ulh-bg-card);
    border-radius: var(--ulh-radius-lg);
    overflow: hidden;
    box-shadow: var(--ulh-shadow-sm);
    transition: var(--ulh-transition);
}

.ulh-member-card-modern:hover {
    transform: translateY(-6px);
    box-shadow: var(--ulh-shadow-lg);
}

.member-card-top {
    position: relative;
    padding: 24px;
    background: var(--ulh-primary-gradient);
    text-align: center;
    border-radius: 20px 20px 0 0;
}

/* Text inside gradient header needs to be readable */
.member-card-top .member-name {
    color: white !important;
}

.member-card-top .member-title {
    color: rgba(255,255,255,0.95) !important;
}

.member-card-top .member-company {
    color: rgba(255,255,255,0.8) !important;
}

.member-avatar-wrap {
    position: relative;
    display: inline-block;
}

.member-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.3);
    object-fit: cover;
}

.member-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 28px;
    height: 28px;
    background: var(--ulh-bg-card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: var(--ulh-shadow-sm);
}

.member-card-body {
    padding: 20px;
}

.member-name {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 600;
    color: var(--ulh-text);
}

.member-occupation {
    margin: 0 0 8px;
    font-size: 14px;
    color: var(--ulh-text-secondary);
}

.member-hub-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: var(--ulh-primary-light);
    color: var(--ulh-primary);
    border-radius: var(--ulh-radius-full);
    font-size: 12px;
    font-weight: 500;
}

.member-card-actions {
    display: flex;
    border-top: 1px solid var(--ulh-border);
}

.member-action-btn {
    flex: 1;
    padding: 14px;
    background: none;
    border: none;
    color: var(--ulh-text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--ulh-transition);
    text-decoration: none;
    text-align: center;
}

.member-action-btn:hover {
    background: var(--ulh-primary-light);
    color: var(--ulh-primary);
}

.member-action-btn:not(:last-child) {
    border-right: 1px solid var(--ulh-border);
}

/* ============================================
   CHECKOUT - MODERN
============================================ */
.ulh-checkout-modern {
    font-family: var(--ulh-font);
    max-width: 900px;
    margin: 0 auto;
    padding: 24px;
}

.ulh-checkout-header {
    text-align: center;
    margin-bottom: 40px;
}

.ulh-checkout-header h1 {
    margin: 0 0 8px;
    font-size: 32px;
    font-weight: 700;
    color: var(--ulh-text);
}

.ulh-checkout-header p {
    margin: 0;
    font-size: 16px;
    color: var(--ulh-text-secondary);
}

/* Progress Steps */
.ulh-checkout-progress-modern {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin-bottom: 40px;
    padding: 28px 20px;
    background: var(--ulh-bg-card);
    border-radius: var(--ulh-radius-xl);
    box-shadow: var(--ulh-shadow-md);
}

.checkout-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    max-width: 160px;
}

.step-indicator {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: var(--ulh-bg);
    border: 3px solid var(--ulh-border);
    transition: var(--ulh-transition);
    position: relative;
    z-index: 2;
}

.checkout-step.active .step-indicator {
    background: var(--ulh-primary-gradient);
    border-color: var(--ulh-primary);
    color: white;
    box-shadow: 0 4px 20px rgba(124,58,237,0.4);
    transform: scale(1.1);
}

.checkout-step.completed .step-indicator {
    background: var(--ulh-success);
    border-color: var(--ulh-success);
    color: white;
}

.step-label {
    margin-top: 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ulh-text-muted);
    text-align: center;
}

.checkout-step.active .step-label {
    color: var(--ulh-primary);
    font-weight: 600;
}

.checkout-step.completed .step-label {
    color: var(--ulh-success);
}

.step-connector {
    position: absolute;
    top: 28px;
    left: calc(50% + 35px);
    width: calc(100% - 70px);
    height: 3px;
    background: var(--ulh-border);
    z-index: 1;
}

.checkout-step.completed .step-connector {
    background: var(--ulh-success);
}

/* Checkout Content */
.ulh-checkout-content-modern {
    background: var(--ulh-bg-card);
    border-radius: var(--ulh-radius-xl);
    padding: 32px;
    box-shadow: var(--ulh-shadow-md);
}

/* Step Sections */
.ulh-step-title {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 700;
    color: var(--ulh-text);
}

.ulh-step-subtitle {
    margin: 0 0 32px;
    color: var(--ulh-text-secondary);
    font-size: 15px;
}

/* Hub Selection Cards */
.ulh-hub-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.ulh-hub-select-card {
    background: var(--ulh-bg);
    border: 2px solid var(--ulh-border);
    border-radius: var(--ulh-radius-lg);
    padding: 24px;
    cursor: pointer;
    transition: var(--ulh-transition);
}

.ulh-hub-select-card:hover {
    border-color: var(--ulh-primary);
    box-shadow: var(--ulh-shadow-glow);
}

.ulh-hub-select-card.selected {
    border-color: var(--ulh-primary);
    background: var(--ulh-primary-light);
}

.ulh-hub-select-card.selected::before {
    content: '✓';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: var(--ulh-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Form Elements */
.ulh-form-group {
    margin-bottom: 24px;
}

.ulh-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--ulh-text);
}

.ulh-form-input,
.ulh-form-select,
.ulh-form-textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--ulh-border);
    border-radius: var(--ulh-radius-md);
    font-size: 15px;
    background: var(--ulh-bg-card);
    color: var(--ulh-text);
    transition: var(--ulh-transition);
}

.ulh-form-input:focus,
.ulh-form-select:focus,
.ulh-form-textarea:focus {
    outline: none;
    border-color: var(--ulh-primary);
    box-shadow: var(--ulh-shadow-glow);
}

/* Buttons */
.ulh-btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--ulh-radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--ulh-transition);
    text-decoration: none;
    border: none;
}

.ulh-btn-modern.primary {
    background: var(--ulh-primary-gradient);
    color: white;
}

.ulh-btn-modern.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(124,58,237,0.35);
}

.ulh-btn-modern.secondary {
    background: var(--ulh-bg);
    color: var(--ulh-text);
    border: 2px solid var(--ulh-border);
}

.ulh-btn-modern.secondary:hover {
    border-color: var(--ulh-primary);
    color: var(--ulh-primary);
}

.ulh-btn-modern.large {
    padding: 18px 36px;
    font-size: 16px;
}

/* Navigation Buttons */
.ulh-step-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--ulh-border);
}

/* ============================================
   MEMBER PROFILE - MODERN
============================================ */
.ulh-profile-modern {
    font-family: var(--ulh-font);
    max-width: 900px;
    margin: 0 auto;
    padding: 24px;
}

.ulh-profile-hero {
    position: relative;
    background: var(--ulh-primary-gradient);
    border-radius: var(--ulh-radius-xl);
    padding: 48px 32px;
    text-align: center;
    margin-bottom: 24px;
    overflow: hidden;
}

.profile-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.profile-hero-content {
    position: relative;
    z-index: 1;
}

.profile-avatar-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 6px solid rgba(255,255,255,0.3);
    object-fit: cover;
}

.profile-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: var(--ulh-shadow-md);
}

.profile-name {
    margin: 0 0 8px;
    font-size: 32px;
    font-weight: 700;
    color: white;
}

.profile-title {
    margin: 0 0 4px;
    font-size: 18px;
    color: rgba(255,255,255,0.9);
}

.profile-company {
    margin: 0;
    font-size: 15px;
    color: rgba(255,255,255,0.7);
}

.profile-badges {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--ulh-radius-full);
    font-size: 13px;
    font-weight: 500;
}

.badge-pill.location {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* Profile Cards */
.profile-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.profile-card {
    background: var(--ulh-bg-card);
    border-radius: var(--ulh-radius-lg);
    box-shadow: var(--ulh-shadow-sm);
    overflow: hidden;
}

.profile-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--ulh-border);
}

.profile-card-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--ulh-text);
}

.profile-card-body {
    padding: 24px;
}

/* Empty State */
.ulh-empty-state-modern {
    text-align: center;
    padding: 60px 24px;
    background: var(--ulh-bg-card);
    border-radius: var(--ulh-radius-lg);
}

.ulh-empty-state-modern .empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.ulh-empty-state-modern h3 {
    margin: 0 0 8px;
    font-size: 20px;
    color: var(--ulh-text);
}

.ulh-empty-state-modern p {
    margin: 0 0 24px;
    color: var(--ulh-text-secondary);
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 768px) {
    .ulh-header-modern {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }
    
    .ulh-header-right {
        width: 100%;
        justify-content: flex-end;
    }
    
    .ulh-nav-scroll {
        padding: 0 16px;
    }
    
    .ulh-content-modern {
        padding: 20px;
    }
    
    .ulh-stats-grid-modern {
        grid-template-columns: 1fr 1fr;
    }
    
    .ulh-directory-tabs {
        padding: 12px;
    }
    
    .ulh-directory-tab {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .ulh-members-grid-modern {
        grid-template-columns: 1fr;
    }
    
    .ulh-checkout-progress-modern {
        padding: 20px 12px;
    }
    
    .checkout-step {
        max-width: none;
    }
    
    .step-indicator {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    
    .step-label {
        font-size: 11px;
    }
    
    .profile-content {
        grid-template-columns: 1fr;
    }
    
    .profile-avatar {
        width: 100px;
        height: 100px;
    }
    
    .profile-name {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .ulh-stats-grid-modern {
        grid-template-columns: 1fr;
    }
    
    .ulh-search-form {
        flex-direction: column;
    }
    
    .ulh-search-btn {
        width: 100%;
    }
    
    .ulh-directory-tabs {
        gap: 6px;
    }
    
    .ulh-directory-tab .tab-label {
        display: none;
    }
}

/* ============================================
   Form Spacing & Overlap Fixes (v5.12)
============================================ */

/* Form Group Spacing */
.ulh-form-group {
    margin-bottom: 20px !important;
}

.ulh-form-group:last-child {
    margin-bottom: 0 !important;
}

.ulh-form-row {
    margin-bottom: 16px;
}

/* Form Label Spacing */
.ulh-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--ulh-text, #1e293b);
}

/* Form Input Spacing */
.ulh-form-input,
.ulh-form-select,
.ulh-form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--ulh-border, #e2e8f0);
    border-radius: 10px;
    font-size: 15px;
    background: var(--ulh-bg-card, #fff);
    color: var(--ulh-text, #1e293b);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ulh-form-input:focus,
.ulh-form-select:focus,
.ulh-form-textarea:focus {
    outline: none;
    border-color: var(--ulh-primary, #7c3aed);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* Form Grid Spacing */
.ulh-form-grid {
    display: grid;
    gap: 20px;
}

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

.ulh-form-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
    .ulh-form-grid-2,
    .ulh-form-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* Card Body Spacing */
.ulh-card-body {
    padding: 24px;
}

.ulh-card-body > *:last-child {
    margin-bottom: 0;
}

/* Card Header Spacing */
.ulh-card-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--ulh-border, #e2e8f0);
}

.ulh-card-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

/* Button Spacing */
.ulh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}

.ulh-btn-primary {
    background: var(--ulh-button-bg, var(--ulh-primary, #7c3aed));
    color: white;
}

.ulh-btn-primary:hover {
    background: var(--ulh-button-hover, var(--ulh-primary-hover, #6d28d9));
    transform: translateY(-1px);
}

.ulh-btn-secondary {
    background: var(--ulh-bg, #f1f5f9);
    color: var(--ulh-text, #1e293b);
    border: 1px solid var(--ulh-border, #e2e8f0);
}

.ulh-btn-secondary:hover {
    background: var(--ulh-border, #e2e8f0);
}

/* Prevent Modal Overlap */
.ulh-modal {
    z-index: 99999 !important;
}

.ulh-modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

/* Fix Section Overlap */
.ulh-section {
    margin-bottom: 32px;
}

.ulh-section:last-child {
    margin-bottom: 0;
}

/* Stats Grid Fix */
.ulh-stats-grid,
.ulh-stats-row {
    display: grid;
    gap: 20px;
    margin-bottom: 24px;
}

/* Fix Tab Content Overlap */
.ulh-tab-content {
    padding: 0;
}

.ulh-tab-content > .ulh-card:not(:last-child) {
    margin-bottom: 24px;
}

/* Empty State Spacing */
.ulh-empty-state {
    text-align: center;
    padding: 60px 24px;
}

.ulh-empty-state .empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Table Spacing */
.ulh-table {
    width: 100%;
    border-collapse: collapse;
}

.ulh-table th,
.ulh-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--ulh-border, #e2e8f0);
}

.ulh-table th {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ulh-text-muted, #64748b);
    background: var(--ulh-bg, #f8fafc);
}

/* List Spacing */
.ulh-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ulh-list-item {
    padding: 16px;
    border-bottom: 1px solid var(--ulh-border, #e2e8f0);
}

.ulh-list-item:last-child {
    border-bottom: none;
}

/* Alert/Notice Spacing */
.ulh-alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.ulh-alert:last-child {
    margin-bottom: 0;
}

/* Quick Action Pills - Mobile Fix */
@media (max-width: 768px) {
    .ulh-quick-actions-modern {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }
    
    .ulh-quick-action-btn {
        flex: 0 1 auto;
        min-width: 100px;
        padding: 10px 16px;
        border-radius: 24px;
        font-size: 13px;
        white-space: nowrap;
    }
}

/* Themed Container Helper */
.ulh-themed-container {
    background: var(--ulh-bg, #f8fafc);
    color: var(--ulh-text, #1e293b);
}

/* Dark/Gold Theme Form Inputs */
[data-theme="dark"] .ulh-form-input,
[data-theme="dark"] .ulh-form-select,
[data-theme="dark"] .ulh-form-textarea,
[data-theme="gold"] .ulh-form-input,
[data-theme="gold"] .ulh-form-select,
[data-theme="gold"] .ulh-form-textarea {
    background: var(--ulh-bg-card);
    border-color: var(--ulh-border);
    color: var(--ulh-text);
}

[data-theme="dark"] .ulh-form-input::placeholder,
[data-theme="dark"] .ulh-form-textarea::placeholder,
[data-theme="gold"] .ulh-form-input::placeholder,
[data-theme="gold"] .ulh-form-textarea::placeholder {
    color: var(--ulh-text-muted);
}

/* Improved Focus States for Accessibility */
.ulh-btn:focus,
.ulh-form-input:focus,
.ulh-form-select:focus,
.ulh-form-textarea:focus {
    outline: 2px solid var(--ulh-primary, #7c3aed);
    outline-offset: 2px;
}

/* Prevent Content Jump on Scroll */
.ulh-dashboard-modern,
.ulh-directory-modern {
    overflow-x: hidden;
}

/* ============================================
   Leaderboard & Gratitude Avatar Fix
============================================ */
.ulh-leaderboard img,
.ulh-leaderboard-item img,
.ulh-leaderboard-avatar,
.ulh-card-body > div > div > img[style*="border-radius"] {
    width: 40px !important;
    height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    flex-shrink: 0 !important;
}

.ulh-gratitude-modern img,
.ulh-gratitude-modern-header img {
    width: 40px !important;
    height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
}
