/* ============================================
   HG Connect - Brand Styles v1.0.0
   Colors: #001d6e (primary), #7fb5ff (secondary)
           #c4ddff (light), #fee2c5 (accent)
   Font: Montserrat
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap');

:root {
    --hg-primary: #001d6e;
    --hg-secondary: #7fb5ff;
    --hg-light: #c4ddff;
    --hg-accent: #fee2c5;
    --hg-white: #ffffff;
    --hg-text: #001d6e;
    --hg-muted: #5f6f89;
    --hg-border: #d9e6f8;
    --hg-shadow: rgba(0, 29, 110, 0.1);
    --hg-font: 'Montserrat', sans-serif;
    --hg-radius: 16px;
    --hg-radius-sm: 8px;
}

/* ============================================
   RESET & BASE
   ============================================ */
.hg-connect-wrapper *,
.hg-connect-wrapper *::before,
.hg-connect-wrapper *::after {
    box-sizing: border-box !important;
}

.hg-connect-wrapper {
    font-family: var(--hg-font) !important;
    color: var(--hg-text) !important;
    max-width: 1100px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    line-height: 1.6 !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

.hg-connect-wrapper .hg-content {
    padding: 0 20px 30px !important;
    box-sizing: border-box !important;
}

/* ============================================
   HEADER - SCOPED
   ============================================ */
.hg-connect-wrapper .hg-header {
    background: var(--hg-primary) !important;
    color: var(--hg-white) !important;
    text-align: center !important;
    padding: 50px 30px !important;
    border-radius: var(--hg-radius) !important;
    margin-bottom: 40px !important;
}

.hg-connect-wrapper .hg-logo {
    font-size: 42px !important;
    font-weight: 700 !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    color: var(--hg-white) !important;
}

.hg-connect-wrapper .hg-tagline {
    font-size: 20px !important;
    font-weight: 500 !important;
    margin: 8px 0 4px !important;
    opacity: 0.9 !important;
    line-height: 1.4 !important;
    color: var(--hg-white) !important;
}

.hg-connect-wrapper .hg-description {
    font-size: 16px !important;
    opacity: 0.8 !important;
    max-width: 500px !important;
    margin: 0 auto 20px !important;
    line-height: 1.5 !important;
    color: var(--hg-white) !important;
}

.hg-connect-wrapper .hg-header-actions {
    display: flex !important;
    gap: 15px !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
}

/* ============================================
   BUTTONS - SCOPED to .hg-connect-wrapper and .hg-auth-modal
   ============================================ */
.hg-connect-wrapper .hg-button,
.hg-connect-wrapper button.hg-button,
.hg-connect-wrapper a.hg-button,
.hg-connect-wrapper input.hg-button,
.hg-auth-modal .hg-button,
.hg-auth-modal button.hg-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 12px 24px !important;
    min-height: 44px !important;
    min-width: 120px !important;
    width: auto !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    font-family: var(--hg-font) !important;
    border: 2px solid transparent !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    text-align: center !important;
    box-sizing: border-box !important;
    box-shadow: 0 2px 8px rgba(0, 29, 110, 0.08) !important;
    user-select: none !important;
}

.hg-connect-wrapper .hg-button:hover,
.hg-auth-modal .hg-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px var(--hg-shadow) !important;
    text-decoration: none !important;
}

.hg-connect-wrapper .hg-button:active,
.hg-auth-modal .hg-button:active {
    transform: translateY(0) scale(0.98) !important;
}

.hg-connect-wrapper .hg-button-primary,
.hg-auth-modal .hg-button-primary {
    background: var(--hg-primary) !important;
    color: var(--hg-white) !important;
    border-color: var(--hg-primary) !important;
}
.hg-connect-wrapper .hg-button-primary:hover,
.hg-auth-modal .hg-button-primary:hover {
    background: #002a8a !important;
    border-color: #002a8a !important;
    color: var(--hg-white) !important;
}

.hg-connect-wrapper .hg-button-secondary,
.hg-auth-modal .hg-button-secondary {
    background: var(--hg-secondary) !important;
    color: var(--hg-primary) !important;
    border-color: var(--hg-secondary) !important;
}
.hg-connect-wrapper .hg-button-secondary:hover,
.hg-auth-modal .hg-button-secondary:hover {
    background: #6aa8f5 !important;
    border-color: #6aa8f5 !important;
    color: var(--hg-primary) !important;
}

.hg-connect-wrapper .hg-button-accent,
.hg-auth-modal .hg-button-accent {
    background: var(--hg-accent) !important;
    color: var(--hg-primary) !important;
    border-color: var(--hg-accent) !important;
}
.hg-connect-wrapper .hg-button-accent:hover,
.hg-auth-modal .hg-button-accent:hover {
    background: #fdd6b0 !important;
    border-color: #fdd6b0 !important;
}

.hg-connect-wrapper .hg-button:disabled,
.hg-connect-wrapper .hg-button[disabled],
.hg-auth-modal .hg-button:disabled,
.hg-auth-modal .hg-button[disabled] {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* ============================================
   BUTTON COLORS - Dashboard & Global
   ============================================ */

/* BLEU FONCÉ - Login, Save, Join */
.hg-connect-wrapper .hg-btn-login,
.hg-connect-wrapper .hg-btn-save,
.hg-connect-wrapper .hg-btn-join {
    background: var(--hg-primary) !important;
    color: var(--hg-white) !important;
    border-color: var(--hg-primary) !important;
}
.hg-connect-wrapper .hg-btn-login:hover,
.hg-connect-wrapper .hg-btn-save:hover,
.hg-connect-wrapper .hg-btn-join:hover {
    background: #002a8a !important;
    color: var(--hg-white) !important;
    border-color: #002a8a !important;
}

/* BLEU PÂLE - Register, View Community */
.hg-connect-wrapper .hg-btn-register,
.hg-connect-wrapper .hg-btn-view {
    background: var(--hg-secondary) !important;
    color: var(--hg-primary) !important;
    border-color: var(--hg-secondary) !important;
}
.hg-connect-wrapper .hg-btn-register:hover,
.hg-connect-wrapper .hg-btn-view:hover {
    background: #6aa8f5 !important;
    color: var(--hg-primary) !important;
    border-color: #6aa8f5 !important;
}

/* ABRICOT / OR - Apply, Login to Apply */
.hg-connect-wrapper .hg-btn-apply,
.hg-connect-wrapper .hg-btn-login-apply {
    background: var(--hg-accent) !important;
    color: var(--hg-primary) !important;
    border-color: var(--hg-accent) !important;
}
.hg-connect-wrapper .hg-btn-apply:hover,
.hg-connect-wrapper .hg-btn-login-apply:hover {
    background: #fdd6b0 !important;
    color: var(--hg-primary) !important;
    border-color: #fdd6b0 !important;
}

/* ============================================
   BUTTON GROUPS
   ============================================ */
.hg-connect-wrapper .hg-actions-row,
.hg-connect-wrapper .hg-button-group,
.hg-connect-wrapper .hg-modal-actions,
.hg-connect-wrapper .hg-community-actions .hg-button-group {
    display: flex !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
    align-items: center !important;
}

.hg-connect-wrapper .hg-actions-row .hg-button,
.hg-connect-wrapper .hg-button-group .hg-button {
    flex: 0 0 auto !important;
}

.hg-connect-wrapper .hg-actions-row .hg-btn-login,
.hg-connect-wrapper .hg-actions-row .hg-btn-register,
.hg-connect-wrapper .hg-actions-row .hg-btn-apply,
.hg-connect-wrapper .hg-actions-row .hg-btn-login-apply,
.hg-connect-wrapper .hg-actions-row .hg-btn-save,
.hg-connect-wrapper .hg-button-group .hg-btn-login,
.hg-connect-wrapper .hg-button-group .hg-btn-register,
.hg-connect-wrapper .hg-button-group .hg-btn-apply,
.hg-connect-wrapper .hg-button-group .hg-btn-login-apply,
.hg-connect-wrapper .hg-button-group .hg-btn-save {
    flex: 1 1 150px !important;
}

/* Login/Create/Apply/Save - pleine largeur */
.hg-connect-wrapper .hg-btn-save,
.hg-connect-wrapper .hg-btn-login,
.hg-connect-wrapper .hg-btn-register,
.hg-connect-wrapper .hg-btn-apply,
.hg-connect-wrapper .hg-btn-login-apply {
    width: 100% !important;
    padding: 8px 12px !important;
    min-height: 36px !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
    border-radius: 8px !important;
}

/* Join/View - réduits */
.hg-connect-wrapper .hg-btn-join,
.hg-connect-wrapper .hg-btn-view,
.hg-connect-wrapper .hg-community-actions .button,
.hg-connect-wrapper .hg-community-actions .button-small {
    padding: 5px 10px !important;
    min-height: 30px !important;
    height: auto !important;
    min-width: auto !important;
    font-size: 12px !important;
    line-height: 1.15 !important;
    border-radius: 7px !important;
    width: auto !important;
}

/* ============================================
   CARDS - SCOPED to .hg-connect-wrapper
   ============================================ */
.hg-connect-wrapper .hg-card {
    background: var(--hg-white) !important;
    border: 1px solid var(--hg-border) !important;
    border-radius: var(--hg-radius) !important;
    padding: 28px 24px !important;
    text-align: center !important;
    transition: box-shadow 0.3s ease !important;
    overflow: hidden !important;
}

.hg-connect-wrapper .hg-card:hover {
    box-shadow: 0 4px 24px var(--hg-shadow) !important;
}

.hg-connect-wrapper .hg-card h3 {
    color: var(--hg-primary) !important;
    margin: 0 0 8px 0 !important;
    font-weight: 700 !important;
    font-size: 18px !important;
    line-height: 1.3 !important;
}

.hg-connect-wrapper .hg-card p {
    color: var(--hg-muted) !important;
    margin: 0 0 16px 0 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
}

.hg-connect-wrapper .hg-card .hg-form-group,
.hg-connect-wrapper .hg-card select,
.hg-connect-wrapper .hg-card input {
    margin-bottom: 10px !important;
}

/* ============================================
   GRID
   ============================================ */
.hg-connect-wrapper .hg-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 24px !important;
    margin: 30px 0 !important;
}

/* ============================================
   STATS
   ============================================ */
.hg-connect-wrapper .hg-stats {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)) !important;
    gap: 20px !important;
    margin: 20px 0 30px !important;
}

.hg-connect-wrapper .hg-stat {
    background: var(--hg-light) !important;
    border-radius: var(--hg-radius-sm) !important;
    padding: 20px !important;
    text-align: center !important;
}

.hg-connect-wrapper .hg-stat-number {
    display: block !important;
    font-size: 32px !important;
    font-weight: 700 !important;
    color: var(--hg-primary) !important;
    line-height: 1.2 !important;
}

.hg-connect-wrapper .hg-stat-label {
    display: block !important;
    font-size: 14px !important;
    color: var(--hg-muted) !important;
    margin-top: 4px !important;
    line-height: 1.4 !important;
}

/* ============================================
   BADGES & TAGS
   ============================================ */
.hg-connect-wrapper .hg-badge {
    display: inline-block !important;
    background: var(--hg-accent) !important;
    color: var(--hg-primary) !important;
    padding: 4px 16px !important;
    border-radius: 999px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
}

.hg-connect-wrapper .hg-badge-admin {
    background: var(--hg-primary) !important;
    color: var(--hg-white) !important;
}

.hg-connect-wrapper .hg-badge-manager {
    background: var(--hg-secondary) !important;
    color: var(--hg-primary) !important;
}

.hg-connect-wrapper .hg-badge-member {
    background: var(--hg-light) !important;
    color: var(--hg-primary) !important;
}

.hg-connect-wrapper .hg-tags {
    display: flex !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
    margin-top: 10px !important;
}

.hg-connect-wrapper .hg-tag {
    background: var(--hg-light) !important;
    padding: 6px 16px !important;
    border-radius: 999px !important;
    font-size: 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    line-height: 1.5 !important;
}

.hg-connect-wrapper .hg-tag-indicator {
    background: var(--hg-primary) !important;
    color: var(--hg-white) !important;
    padding: 1px 10px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
}

.hg-connect-wrapper .hg-indicator {
    display: inline-block !important;
    background: var(--hg-primary) !important;
    color: var(--hg-white) !important;
    padding: 2px 14px !important;
    border-radius: 999px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
}

/* ============================================
   SELECTOR
   ============================================ */
.hg-connect-wrapper .hg-selector {
    display: flex !important;
    gap: 10px !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
}

.hg-connect-wrapper .hg-selector select {
    padding: 12px 18px !important;
    border: 2px solid var(--hg-border) !important;
    border-radius: var(--hg-radius-sm) !important;
    font-family: var(--hg-font) !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
    min-width: 200px !important;
    background: var(--hg-white) !important;
    color: var(--hg-text) !important;
    height: 48px !important;
}

.hg-connect-wrapper .hg-selector select:focus {
    border-color: var(--hg-primary) !important;
    outline: none !important;
}

/* ============================================
   FORMS - SCOPED to .hg-connect-wrapper
   ============================================ */
.hg-connect-wrapper .hg-profile-section {
    background: #ffffff !important;
    border: 1px solid var(--hg-border) !important;
    border-radius: 18px !important;
    padding: 32px 28px !important;
    box-shadow: 0 10px 30px rgba(0, 29, 110, 0.08) !important;
    max-width: 600px !important;
    margin: 0 auto !important;
}

.hg-connect-wrapper .hg-profile-section h2 {
    color: var(--hg-primary) !important;
    text-align: center !important;
    margin: 0 0 8px 0 !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
}

.hg-connect-wrapper .hg-profile-section > p {
    text-align: center !important;
    color: var(--hg-muted) !important;
    margin: 0 0 24px 0 !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
}

.hg-connect-wrapper .hg-contact-shared-form.hg-profile-form {
    max-width: 100% !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.hg-connect-wrapper .hg-form-group {
    margin-bottom: 20px !important;
}

.hg-connect-wrapper .hg-form-group label {
    display: block !important;
    font-weight: 600 !important;
    margin-bottom: 6px !important;
    color: var(--hg-text) !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
}

.hg-connect-wrapper .hg-form-group input[type="text"],
.hg-connect-wrapper .hg-form-group input[type="tel"],
.hg-connect-wrapper .hg-form-group input[type="email"],
.hg-connect-wrapper .hg-form-group input[type="password"],
.hg-connect-wrapper .hg-form-group select,
.hg-connect-wrapper .hg-form-group textarea {
    width: 100% !important;
    padding: 11px 16px !important;
    border: 2px solid var(--hg-border) !important;
    border-radius: var(--hg-radius-sm) !important;
    font-family: var(--hg-font) !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
    background: var(--hg-white) !important;
    color: var(--hg-text) !important;
    transition: border-color 0.3s ease !important;
    height: 48px !important;
    box-sizing: border-box !important;
    display: block !important;
}

.hg-connect-wrapper .hg-form-group textarea {
    height: auto !important;
    min-height: 80px !important;
    resize: vertical !important;
}

.hg-connect-wrapper .hg-form-group select {
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23001d6e' d='M6 8L1 3h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    padding-right: 40px !important;
    cursor: pointer !important;
}

.hg-connect-wrapper .hg-form-group input:focus,
.hg-connect-wrapper .hg-form-group select:focus,
.hg-connect-wrapper .hg-form-group textarea:focus {
    border-color: var(--hg-primary) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(0, 29, 110, 0.1) !important;
}

.hg-connect-wrapper .hg-form-group input[type="checkbox"] {
    margin-right: 10px !important;
    transform: scale(1.1) !important;
    vertical-align: middle !important;
}

.hg-connect-wrapper .hg-form-group .hg-small {
    display: block !important;
    margin-top: 5px !important;
    font-size: 13px !important;
    color: var(--hg-muted) !important;
    line-height: 1.4 !important;
}

.hg-connect-wrapper .hg-form-actions {
    display: flex !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    margin-top: 24px !important;
    padding-top: 20px !important;
    border-top: 2px solid #f0f0f0 !important;
}

.hg-connect-wrapper .hg-form-actions .hg-button {
    flex: 1 !important;
    min-width: 120px !important;
}

/* ============================================
   MULTI-PHONE INPUT - SCOPED
   ============================================ */
.hg-connect-wrapper .hg-phone-numbers-group .hg-phone-row {
    margin-top: 10px !important;
}

.hg-connect-wrapper .hg-phone-numbers-group .hg-phone-row:first-child {
    margin-top: 8px !important;
}

.hg-connect-wrapper .hg-phone-numbers-group .hg-phone-row > div {
    display: grid !important;
    grid-template-columns: 100px 1fr 90px auto !important;
    gap: 8px !important;
    align-items: center !important;
}

.hg-connect-wrapper .hg-phone-numbers-group .hg-phone-code-select {
    height: 42px !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
}

.hg-connect-wrapper .hg-phone-numbers-group .hg-phone-field {
    height: 42px !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
}

.hg-connect-wrapper .hg-phone-numbers-group .hg-remove-phone-row {
    height: 42px !important;
    min-height: 42px !important;
    min-width: 42px !important;
    padding: 0 !important;
    font-size: 18px !important;
    line-height: 1 !important;
}

.hg-connect-wrapper .hg-phone-numbers-group .hg-phone-warning {
    display: none !important;
    color: #dc3232 !important;
    font-size: 13px !important;
    margin-top: 4px !important;
}

.hg-connect-wrapper .hg-phone-numbers-group .hg-add-phone-row {
    margin-top: 10px !important;
}

/* Legacy phone input */
.hg-connect-wrapper .hg-phone-input {
    display: flex !important;
    align-items: stretch !important;
    border: 2px solid var(--hg-border) !important;
    border-radius: var(--hg-radius-sm) !important;
    overflow: hidden !important;
    transition: border-color 0.3s ease !important;
    background: var(--hg-white) !important;
}

.hg-connect-wrapper .hg-phone-input:focus-within {
    border-color: var(--hg-primary) !important;
    box-shadow: 0 0 0 3px rgba(0, 29, 110, 0.1) !important;
}

.hg-connect-wrapper .hg-phone-code {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--hg-light) !important;
    padding: 0 16px !important;
    font-weight: 600 !important;
    color: var(--hg-primary) !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
    border-right: 2px solid var(--hg-border) !important;
    min-width: 70px !important;
    height: 48px !important;
    flex-shrink: 0 !important;
}

.hg-connect-wrapper .hg-phone-input input {
    border: none !important;
    flex: 1 !important;
    padding: 0 16px !important;
    font-family: var(--hg-font) !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
    background: var(--hg-white) !important;
    color: var(--hg-text) !important;
    outline: none !important;
    height: 48px !important;
    min-height: 48px !important;
    box-sizing: border-box !important;
}

.hg-connect-wrapper .hg-phone-input input:focus {
    box-shadow: none !important;
}

/* ============================================
   DASHBOARD LAYOUT
   ============================================ */
.hg-connect-wrapper .hg-dashboard-layout {
    display: flex !important;
    gap: 30px !important;
    margin: 20px 0 !important;
    align-items: flex-start !important;
}

.hg-connect-wrapper .hg-dashboard-sidebar {
    flex: 0 0 240px !important;
    width: 240px !important;
    max-width: 240px !important;
}

.hg-connect-wrapper .hg-dashboard-content {
    flex: 1 !important;
    min-width: 0 !important;
    width: 100% !important;
    background: #fff !important;
    border: 1px solid #e9ecef !important;
    border-radius: 12px !important;
    padding: 25px !important;
    min-height: 400px !important;
    overflow-x: visible !important;
}

.hg-connect-wrapper .hg-dashboard-content-inner {
    width: 100% !important;
    overflow: visible !important;
}

.hg-connect-wrapper .hg-dashboard-content .wrap {
    margin: 0 !important;
}

.hg-connect-wrapper .hg-dashboard-header {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 15px !important;
    flex-wrap: wrap !important;
    margin-bottom: 20px !important;
    padding-bottom: 15px !important;
    border-bottom: 2px solid var(--hg-border) !important;
}

.hg-connect-wrapper .hg-dashboard-header h2 {
    margin: 0 !important;
    color: var(--hg-primary) !important;
    font-size: 22px !important;
    line-height: 1.3 !important;
}

.hg-connect-wrapper .hg-contact-id {
    color: var(--hg-muted) !important;
    font-size: 14px !important;
    margin: 4px 0 0 !important;
    line-height: 1.5 !important;
}

.hg-connect-wrapper .hg-profile-badge {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}

.hg-connect-wrapper .hg-country-badge {
    display: inline-flex !important;
    align-items: center !important;
    background: var(--hg-light) !important;
    padding: 4px 14px !important;
    border-radius: 999px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--hg-primary) !important;
    line-height: 1.5 !important;
}

.hg-connect-wrapper .hg-phone-badge {
    display: inline-flex !important;
    align-items: center !important;
    background: var(--hg-accent) !important;
    padding: 4px 14px !important;
    border-radius: 999px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--hg-primary) !important;
    line-height: 1.5 !important;
}

/* ============================================
   DASHBOARD TABS - Version PC (vertical)
   ============================================ */
.hg-connect-wrapper .hg-dashboard-tabs {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    min-width: 220px !important;
    background: #fff !important;
    border: 1px solid #e9ecef !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
}

.hg-connect-wrapper .hg-dashboard-tab {
    border-radius: 6px !important;
    margin: 0 8px !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

.hg-connect-wrapper .hg-dashboard-tab:last-child {
    border-bottom: none !important;
    margin-top: 8px !important;
    border-top: 1px solid #e9ecef !important;
    padding-top: 8px !important;
}

.hg-connect-wrapper .hg-dashboard-tab a {
    display: block !important;
    padding: 10px 16px !important;
    text-decoration: none !important;
    color: #555 !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
}

.hg-connect-wrapper .hg-dashboard-tab a:hover {
    background: #f0f4f8 !important;
    color: #001d6e !important;
}

.hg-connect-wrapper .hg-dashboard-tab.active a {
    background: #f0f4f8 !important;
    color: #001d6e !important;
    font-weight: 600 !important;
}

/* ============================================
   SIDEBAR - Avatar & User Info
   ============================================ */
.hg-connect-wrapper .hg-sidebar-user {
    text-align: center !important;
    padding: 20px 15px 15px !important;
    border-bottom: 2px solid #e9ecef !important;
    margin-bottom: 10px !important;
}

.hg-connect-wrapper .hg-sidebar-avatar {
    width: 64px !important;
    height: 64px !important;
    border-radius: 50% !important;
    background: #001d6e !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto 10px !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    overflow: hidden !important;
}

.hg-connect-wrapper .hg-sidebar-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.hg-connect-wrapper .hg-sidebar-avatar .hg-avatar-initials {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #fff !important;
}

.hg-connect-wrapper .hg-sidebar-name {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #001d6e !important;
    margin-bottom: 4px !important;
}

.hg-connect-wrapper .hg-sidebar-role {
    font-size: 12px !important;
}

.hg-connect-wrapper .hg-sidebar-role .hg-badge {
    display: inline-block !important;
    padding: 3px 14px !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
}

/* ============================================
   COMMUNITY VIEW
   ============================================ */
.hg-connect-wrapper .hg-community-view {
    background: var(--hg-white) !important;
    border: 1px solid var(--hg-border) !important;
    border-radius: var(--hg-radius) !important;
    padding: 35px !important;
}

.hg-connect-wrapper .hg-community-header {
    border-bottom: 2px solid var(--hg-border) !important;
    padding-bottom: 20px !important;
    margin-bottom: 30px !important;
}

.hg-connect-wrapper .hg-community-header h2 {
    color: var(--hg-primary) !important;
    margin: 0 0 10px !important;
    font-size: 24px !important;
    line-height: 1.3 !important;
}

.hg-connect-wrapper .hg-community-meta p {
    margin: 5px 0 !important;
    color: var(--hg-muted) !important;
    line-height: 1.5 !important;
}

.hg-connect-wrapper .hg-community-meta strong {
    color: var(--hg-text) !important;
}

.hg-connect-wrapper .hg-community-actions .hg-card {
    margin-bottom: 20px !important;
}

/* Mini buttons in community */
.hg-connect-wrapper .hg-community-actions .button-small,
.hg-connect-wrapper .hg-community-actions .button {
    padding: 2px 10px !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
    height: 28px !important;
    min-height: 28px !important;
    border-radius: 4px !important;
    border-width: 1px !important;
    transition: all 0.2s ease !important;
}

.hg-connect-wrapper .hg-community-actions .button-view {
    background: #c4ddff !important;
    border-color: #c4ddff !important;
    color: #001d6e !important;
}

.hg-connect-wrapper .hg-community-actions .button-view:hover {
    background: #7fb5ff !important;
    border-color: #7fb5ff !important;
    color: #001d6e !important;
}

.hg-connect-wrapper .hg-community-actions .button-page {
    background: #001d6e !important;
    border-color: #001d6e !important;
    color: #fff !important;
}

.hg-connect-wrapper .hg-community-actions .button-page:hover {
    background: #002a8a !important;
    border-color: #002a8a !important;
    color: #fff !important;
}

.hg-connect-wrapper .hg-community-actions .button-edit {
    background: #f0f0f0 !important;
    border-color: #ddd !important;
    color: #555 !important;
}

.hg-connect-wrapper .hg-community-actions .button-edit:hover {
    background: #e0e0e0 !important;
    border-color: #bbb !important;
    color: #333 !important;
}

/* ============================================
   ADMIN STYLES
   ============================================ */
.hg-connect-wrapper .hg-admin-stat-box {
    transition: all 0.3s ease !important;
    cursor: pointer !important;
}

.hg-connect-wrapper .hg-admin-stat-box:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 20px rgba(0, 29, 110, 0.15) !important;
}

.hg-connect-wrapper .hg-admin-number {
    font-size: 36px !important;
    font-weight: 700 !important;
    color: #001d6e !important;
}

.hg-connect-wrapper .hg-admin-label {
    color: #001d6e !important;
    font-weight: 500 !important;
}

.hg-connect-wrapper .hg-admin-table-wrap {
    overflow-x: auto !important;
    background: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    width: 100% !important;
}

.hg-connect-wrapper .hg-admin-table-wrap table {
    margin: 0 !important;
}

.hg-connect-wrapper .hg-admin-table-wrap th {
    background: #f8f9fa !important;
}

.hg-connect-wrapper .hg-admin-table-wrap td .button {
    white-space: nowrap !important;
}

.hg-connect-wrapper .hg-admin-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    gap: 20px !important;
    margin: 30px 0 !important;
}

.hg-connect-wrapper .hg-admin-card {
    background: #fff !important;
    border-radius: 12px !important;
    padding: 24px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
    text-align: center !important;
    border-left: 4px solid #001d6e !important;
}

.hg-connect-wrapper .hg-admin-card-primary {
    border-left-color: #001d6e !important;
}
.hg-connect-wrapper .hg-admin-card-secondary {
    border-left-color: #7fb5ff !important;
}
.hg-connect-wrapper .hg-admin-card-accent {
    border-left-color: #fee2c5 !important;
}
.hg-connect-wrapper .hg-admin-card-light {
    border-left-color: #c4ddff !important;
}

/* ============================================
   STATUS BADGES
   ============================================ */
.hg-connect-wrapper .hg-status {
    display: inline-block !important;
    padding: 3px 12px !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
}

.hg-connect-wrapper .hg-status-active {
    background: #d4edda !important;
    color: #155724 !important;
}

.hg-connect-wrapper .hg-status-inactive {
    background: #f8d7da !important;
    color: #721c24 !important;
}

.hg-connect-wrapper .hg-status-pending {
    background: #fff3cd !important;
    color: #856404 !important;
}

.hg-connect-wrapper .hg-status-approved {
    background: #d4edda !important;
    color: #155724 !important;
}

.hg-connect-wrapper .hg-status-rejected {
    background: #f8d7da !important;
    color: #721c24 !important;
}

/* ============================================
   MINI BUTTONS
   ============================================ */
.hg-connect-wrapper .hg-mini-btn,
.hg-connect-wrapper .hg-dashboard-content .button.hg-mini-btn,
.hg-connect-wrapper .hg-admin-table-wrap .button.hg-mini-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: auto !important;
    height: 24px !important;
    min-height: 24px !important;
    padding: 1px 9px !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    border-radius: 5px !important;
    font-weight: 600 !important;
    box-shadow: none !important;
    white-space: nowrap !important;
}

/* ============================================
   WELCOME - RETIRED (now in connect-page.css)
   ============================================ */
/* .hg-welcome, .hg-welcome h2, .hg-welcome > p moved to connect-page.css */

/* ============================================
   SMALL TEXT - SCOPED
   ============================================ */
.hg-connect-wrapper .hg-small,
.hg-auth-modal .hg-small {
    font-size: 14px !important;
    color: var(--hg-muted) !important;
    line-height: 1.5 !important;
}

.hg-connect-wrapper .hg-small a,
.hg-auth-modal .hg-small a {
    color: var(--hg-primary) !important;
    text-decoration: none !important;
}

.hg-connect-wrapper .hg-small a:hover,
.hg-auth-modal .hg-small a:hover {
    text-decoration: underline !important;
}

/* ============================================
   ACTIONS - SCOPED
   ============================================ */
.hg-connect-wrapper .hg-actions {
    display: flex !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
    margin: 20px 0 30px !important;
}

/* ============================================
   COMMUNITIES LIST
   ============================================ */
.hg-connect-wrapper .hg-communities {
    border-top: 2px solid var(--hg-border) !important;
    padding-top: 25px !important;
}

.hg-connect-wrapper .hg-communities h3 {
    margin-top: 0 !important;
    color: var(--hg-primary) !important;
    line-height: 1.3 !important;
}

/* ============================================
   AUTH MODAL - FIXÉ AU CENTRE
   ============================================ */

/* Body scroll lock */
body.hg-modal-open {
    overflow: hidden !important;
}

.hg-auth-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9999999 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 14px !important;
    background: transparent !important;
}

.hg-auth-modal.active,
.hg-auth-modal[style*="display: flex"],
.hg-auth-modal[style*="display:flex"],
.hg-auth-modal[style*="display: block"],
.hg-auth-modal[style*="display:block"] {
    display: flex !important;
}

.hg-auth-modal[style*="display: none"],
.hg-auth-modal[style*="display:none"] {
    display: none !important;
}

.hg-auth-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9999998 !important;
    background: rgba(0, 0, 0, 0.6) !important;
    cursor: pointer !important;
}

.hg-auth-content {
    position: relative !important;
    z-index: 9999999 !important;
    background: #fff !important;
    border-radius: 16px !important;
    width: min(440px, 100%) !important;
    max-width: 440px !important;
    max-height: calc(100vh - 28px) !important;
    overflow-y: auto !important;
    margin: 0 auto !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
    animation: hg-auth-slide 0.3s ease !important;
}

@keyframes hg-auth-slide {
    from { transform: translateY(-20px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.hg-auth-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 20px 24px !important;
    border-bottom: 2px solid #f0f0f0 !important;
    background: #f8f9fa !important;
    border-radius: 16px 16px 0 0 !important;
}

.hg-auth-header h2 {
    margin: 0 !important;
    color: #001d6e !important;
    font-size: 20px !important;
    font-weight: 700 !important;
}

.hg-auth-close {
    font-size: 28px !important;
    font-weight: 300 !important;
    cursor: pointer !important;
    color: #6c757d !important;
    transition: color 0.3s ease !important;
    line-height: 1 !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
}

.hg-auth-close:hover {
    color: #dc3232 !important;
}

.hg-auth-body {
    padding: 30px 24px !important;
}

.hg-auth-body .hg-form-group {
    margin-bottom: 18px !important;
}

.hg-auth-body .hg-form-group label {
    display: block !important;
    font-weight: 600 !important;
    margin-bottom: 5px !important;
    color: #333 !important;
    font-size: 14px !important;
}

.hg-auth-body .hg-form-group input[type="text"],
.hg-auth-body .hg-form-group input[type="email"],
.hg-auth-body .hg-form-group input[type="password"],
.hg-auth-body .hg-form-group input[type="tel"] {
    width: 100% !important;
    padding: 10px 14px !important;
    border: 2px solid #d9e6f8 !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-family: 'Montserrat', sans-serif !important;
    box-sizing: border-box !important;
    transition: border-color 0.3s ease !important;
}

.hg-auth-body .hg-form-group input:focus {
    border-color: #001d6e !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(0, 29, 110, 0.1) !important;
}

.hg-auth-body .hg-auth-button {
    width: 100% !important;
    padding: 12px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-family: 'Montserrat', sans-serif !important;
}

.hg-auth-body .hg-auth-button-primary {
    background: #001d6e !important;
    color: #fff !important;
}

.hg-auth-body .hg-auth-button-primary:hover {
    background: #002a8a !important;
}

.hg-auth-body .hg-auth-button-secondary {
    background: #f0f4f8 !important;
    color: #001d6e !important;
}

.hg-auth-body .hg-auth-button-secondary:hover {
    background: #e2e8f0 !important;
}

.hg-auth-switch {
    text-align: center !important;
    margin-top: 15px !important;
    font-size: 14px !important;
    color: #6c757d !important;
}

.hg-auth-switch a {
    color: #001d6e !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    text-decoration: none !important;
}

.hg-auth-switch a:hover {
    text-decoration: underline !important;
}

.hg-auth-error {
    background: #f8d7da !important;
    color: #721c24 !important;
    padding: 10px 14px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    margin-bottom: 15px !important;
    display: none !important;
}

.hg-auth-error.show {
    display: block !important;
}

.hg-auth-success {
    background: #d4edda !important;
    color: #155724 !important;
    padding: 10px 14px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    margin-bottom: 15px !important;
    display: none !important;
}

.hg-auth-success.show {
    display: block !important;
}

.hg-auth-tabs {
    display: flex !important;
    border-bottom: 2px solid #e9ecef !important;
    margin: 0 -24px 20px !important;
    padding: 0 24px !important;
}

.hg-auth-tab {
    padding: 12px 20px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    border-bottom: 3px solid transparent !important;
    transition: all 0.3s ease !important;
    color: #6c757d !important;
}

.hg-auth-tab:hover {
    color: #001d6e !important;
}

.hg-auth-tab.active {
    color: #001d6e !important;
    border-bottom-color: #001d6e !important;
}

.hg-auth-tab-content {
    display: none !important;
}

.hg-auth-tab-content.active {
    display: block !important;
}

/* ============================================
   MODAL - Generic (SCOPED to .hg-connect-wrapper ONLY)
   ============================================ */
.hg-connect-wrapper .hg-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 999999 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 14px !important;
    background: transparent !important;
}

.hg-connect-wrapper .hg-modal.active,
.hg-connect-wrapper .hg-modal[style*="display: block"],
.hg-connect-wrapper .hg-modal[style*="display:block"],
.hg-connect-wrapper .hg-modal[style*="display: flex"],
.hg-connect-wrapper .hg-modal[style*="display:flex"] {
    display: flex !important;
}

.hg-connect-wrapper .hg-modal[style*="display: none"],
.hg-connect-wrapper .hg-modal[style*="display:none"] {
    display: none !important;
}

.hg-connect-wrapper .hg-modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 999998 !important;
    background: rgba(0, 0, 0, 0.6) !important;
    cursor: pointer !important;
}

.hg-connect-wrapper .hg-modal-content {
    position: relative !important;
    z-index: 999999 !important;
    background: #fff !important;
    border-radius: 12px !important;
    width: 90% !important;
    max-width: 650px !important;
    max-height: 90vh !important;
    overflow: auto !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
    animation: hg-modal-slide 0.3s ease !important;
}

@keyframes hg-modal-slide {
    from { transform: translateY(-30px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.hg-connect-wrapper .hg-modal-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 20px 25px !important;
    border-bottom: 2px solid #f0f0f0 !important;
    background: #f8f9fa !important;
    border-radius: 12px 12px 0 0 !important;
}

.hg-connect-wrapper .hg-modal-header h2 {
    margin: 0 !important;
    color: #001d6e !important;
    font-size: 20px !important;
}

.hg-connect-wrapper .hg-modal-close {
    font-size: 28px !important;
    font-weight: 300 !important;
    cursor: pointer !important;
    color: #6c757d !important;
    transition: color 0.3s ease !important;
    line-height: 1 !important;
}

.hg-connect-wrapper .hg-modal-close:hover {
    color: #dc3232 !important;
}

.hg-connect-wrapper .hg-modal-body {
    padding: 25px !important;
}

.hg-connect-wrapper .hg-modal-actions {
    display: flex !important;
    gap: 12px !important;
    justify-content: flex-end !important;
    margin-top: 25px !important;
    padding-top: 20px !important;
    border-top: 2px solid #f0f0f0 !important;
}

/* ============================================
   LIMITED ACCESS - User logged in without profile
   ============================================ */
.hg-connect-wrapper .hg-limited-access-notice {
    background: #fff3cd !important;
    border-left: 4px solid #ffc107 !important;
    border-radius: 12px !important;
    padding: 16px 18px !important;
    margin-bottom: 18px !important;
    color: #856404 !important;
}

.hg-connect-wrapper .hg-limited-access-notice h3 {
    margin: 0 0 8px !important;
    color: #856404 !important;
    font-size: 17px !important;
}

.hg-connect-wrapper .hg-limited-access-notice p {
    margin: 0 0 12px !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
}

.hg-connect-wrapper .hg-limited-warning {
    background: #fff3cd !important;
    border-left: 4px solid #ffc107 !important;
    color: #856404 !important;
    padding: 10px 14px !important;
    border-radius: 8px !important;
    margin-bottom: 14px !important;
    font-weight: 600 !important;
}

.hg-connect-wrapper .hg-limited-table-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

.hg-connect-wrapper .hg-limited-table {
    width: 100% !important;
    border-collapse: collapse !important;
    background: #fff !important;
    font-size: 14px !important;
}

.hg-connect-wrapper .hg-limited-table th,
.hg-connect-wrapper .hg-limited-table td {
    padding: 10px 12px !important;
    border-bottom: 1px solid #e9ecef !important;
    text-align: left !important;
    vertical-align: middle !important;
}

.hg-connect-wrapper .hg-limited-table th {
    background: #f8f9fa !important;
    color: #001d6e !important;
    font-weight: 700 !important;
}

/* Profile exit / cancel box */
.hg-connect-wrapper .hg-profile-exit-box {
    background: #f5f9ff !important;
    border: 1px solid #d9e6f8 !important;
    border-radius: 12px !important;
    padding: 12px 14px !important;
    margin: 14px 0 18px !important;
    text-align: center !important;
}

.hg-connect-wrapper .hg-profile-exit-box p {
    margin: 0 0 10px !important;
    font-size: 13px !important;
    color: #5f6f89 !important;
    line-height: 1.45 !important;
}

.hg-connect-wrapper .hg-profile-exit-actions {
    display: flex !important;
    gap: 10px !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
}

/* Responsive tables */
.hg-connect-wrapper .hg-responsive-table-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

/* Inline actions for tables */
.hg-connect-wrapper .hg-inline-actions,
.hg-connect-wrapper .hg-table-actions {
    display: flex !important;
    flex-direction: row !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
    width: auto !important;
}

.hg-connect-wrapper .hg-inline-actions .hg-button,
.hg-connect-wrapper .hg-table-actions .hg-button {
    width: auto !important;
    min-width: auto !important;
    min-height: 30px !important;
    padding: 5px 10px !important;
    font-size: 11px !important;
}

/* ============================================
   SIDEBAR TABS / LOGOUT CLEAN FINAL
   Fix double border, small text, centered buttons
   ============================================ */

/* Sidebar tab buttons - desktop + global */
.hg-connect-wrapper .hg-dashboard-tabs {
    gap: 6px !important;
    padding: 8px !important;
}

.hg-connect-wrapper .hg-dashboard-tab {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.hg-connect-wrapper .hg-dashboard-tab a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 40px !important;
    padding: 9px 12px !important;
    border-radius: 8px !important;
    border: 1px solid #e9ecef !important;
    background: #ffffff !important;
    color: #001d6e !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    text-decoration: none !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
    box-shadow: none !important;
}

/* Hover propre san reflet double */
.hg-connect-wrapper .hg-dashboard-tab a:hover {
    background: #f5f9ff !important;
    border-color: #c4ddff !important;
    color: #001d6e !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Active tab */
.hg-connect-wrapper .hg-dashboard-tab.active a {
    background: #001d6e !important;
    color: #ffffff !important;
    border-color: #001d6e !important;
    box-shadow: none !important;
}

/* Logout / last tab clean */
.hg-connect-wrapper .hg-dashboard-tab:last-child {
    margin-top: 8px !important;
    padding-top: 8px !important;
    border-top: 1px solid #e9ecef !important;
}

.hg-connect-wrapper .hg-dashboard-tab:last-child a,
.hg-connect-wrapper .hg-dashboard-tab a[href*="logout"],
.hg-connect-wrapper .hg-dashboard-tab a[href*="log-out"],
.hg-connect-wrapper .hg-dashboard-tab a[href*="wp-login.php?action=logout"] {
    background: #fff5f5 !important;
    color: #dc3545 !important;
    border: 1px solid #f3b6bd !important;
    box-shadow: none !important;
}

.hg-connect-wrapper .hg-dashboard-tab:last-child a:hover,
.hg-connect-wrapper .hg-dashboard-tab a[href*="logout"]:hover,
.hg-connect-wrapper .hg-dashboard-tab a[href*="log-out"]:hover,
.hg-connect-wrapper .hg-dashboard-tab a[href*="wp-login.php?action=logout"]:hover {
    background: #dc3545 !important;
    color: #ffffff !important;
    border-color: #dc3545 !important;
    box-shadow: none !important;
    transform: none !important;
}

/* ============================================
   PROFILE OVERVIEW BOX
   Member / Manager dashboard top profile card
   ============================================ */

.hg-connect-wrapper .hg-profile-overview-box {
    width: 100% !important;
    max-width: 100% !important;

    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 18px !important;

    background: #ffffff !important;
    border: 1px solid #d9e6f8 !important;
    border-radius: 14px !important;

    padding: 18px 20px !important;
    margin: 0 0 18px 0 !important;

    box-shadow: 0 4px 18px rgba(0, 29, 110, 0.08) !important;

    box-sizing: border-box !important;
    overflow: hidden !important;
}

.hg-connect-wrapper .hg-profile-overview-left {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;

    min-width: 0 !important;
    flex: 1 1 auto !important;
}

.hg-connect-wrapper .hg-profile-overview-avatar {
    width: 54px !important;
    height: 54px !important;
    min-width: 54px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    border-radius: 50% !important;
    background: #001d6e !important;
    color: #ffffff !important;

    font-size: 20px !important;
    font-weight: 700 !important;

    box-sizing: border-box !important;
}

.hg-connect-wrapper .hg-profile-overview-main {
    min-width: 0 !important;
}

.hg-connect-wrapper .hg-profile-overview-main h2 {
    margin: 0 0 3px 0 !important;

    color: #001d6e !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;

    white-space: normal !important;
    overflow-wrap: anywhere !important;
}

.hg-connect-wrapper .hg-profile-overview-id {
    margin: 0 0 6px 0 !important;

    color: #5f6f89 !important;
    font-size: 13px !important;
    line-height: 1.3 !important;
}

.hg-connect-wrapper .hg-profile-overview-role {
    display: inline-flex !important;
    align-items: center !important;

    background: #c4ddff !important;
    color: #001d6e !important;

    padding: 3px 12px !important;
    border-radius: 999px !important;

    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
}

.hg-connect-wrapper .hg-profile-overview-right {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 8px !important;

    flex: 0 0 auto !important;
    min-width: 120px !important;
    max-width: 45% !important;
}

.hg-connect-wrapper .hg-profile-overview-info {
    width: 100% !important;

    background: #f5f9ff !important;
    border: 1px solid #d9e6f8 !important;
    border-radius: 10px !important;

    padding: 7px 10px !important;

    text-align: right !important;
    box-sizing: border-box !important;
}

.hg-connect-wrapper .hg-profile-overview-info .hg-info-label {
    display: block !important;

    color: #5f6f89 !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
}

.hg-connect-wrapper .hg-profile-overview-info strong {
    display: block !important;

    color: #001d6e !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;

    overflow-wrap: anywhere !important;
}

/* ============================================
   PRINT STYLES - SCOPED
   ============================================ */
@media print {
    .hg-connect-wrapper .hg-header,
    .hg-connect-wrapper .hg-footer,
    .hg-connect-wrapper .hg-actions,
    .hg-connect-wrapper .hg-button,
    .hg-connect-wrapper .hg-modal,
    .hg-auth-modal {
        display: none !important;
    }
    
    .hg-connect-wrapper {
        padding: 20px !important;
    }
    
    .hg-connect-wrapper .hg-card {
        break-inside: avoid !important;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* ============================================
   HG CONNECT GLOBAL RESPONSIBILITY LOCK
   hg-connect.css must NOT control:
   - Welcome page layout/cards/buttons (connect-page.css)
   - Public Profile business card (public-profile.css)
   - Public Profile Add Link modal (public-profile.css)
   ============================================ */

/*
   Do NOT add here:
   .hg-welcome
   .hg-welcome-grid
   .hg-card-join
   .hg-card-save
   .hg-card-member
   .hg-card-manager
   .hg-public-profile-wrap
   .hg-public-landing
   .hg-business-card
   .hg-card-rectangle
   .hg-card-centered
   .hg-biz-*
   #hg-add-link-modal
*/
/* ============================================================
   TEST OVERRIDE - COMMUNITY LANDING MANAGER VIEW
   Page: /connect/?community=slug
   ============================================================ */

.hg-connect-wrapper .hg-community-view {
    width: 100% !important;
    max-width: 760px !important;
    margin: 0 auto !important;
    padding: 22px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

.hg-connect-wrapper .hg-community-header {
    text-align: center !important;
    padding-bottom: 16px !important;
    margin-bottom: 18px !important;
}

.hg-connect-wrapper .hg-community-header h2 {
    font-size: 22px !important;
    margin-bottom: 6px !important;
}

/* Community list card */
.hg-connect-wrapper .hg-manager-community-list {
    width: 100% !important;
    display: grid !important;
    gap: 12px !important;
    margin: 16px 0 !important;
}

.hg-connect-wrapper .hg-manager-community-item {
    width: 100% !important;
    background: #f8fbff !important;
    border: 1px solid #d9e6f8 !important;
    border-radius: 14px !important;
    padding: 14px !important;
    box-sizing: border-box !important;
}

/* Info + buttons on same row when space allows */
.hg-connect-wrapper .hg-community-item-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Edit / View buttons horizontal */
.hg-connect-wrapper .hg-community-item-actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
}

.hg-connect-wrapper .hg-community-item-actions .button,
.hg-connect-wrapper .hg-community-item-actions .button-small {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 72px !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 5px 10px !important;
    font-size: 12px !important;
    line-height: 1.1 !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}

/* Save Contacts block */
.hg-connect-wrapper .hg-download-section {
    margin-top: 18px !important;
    padding: 18px !important;
    background: #ffffff !important;
    border: 1px solid #d9e6f8 !important;
    border-radius: 14px !important;
    text-align: center !important;
}

.hg-connect-wrapper .hg-download-section h3 {
    margin: 0 0 6px !important;
    font-size: 18px !important;
}

.hg-connect-wrapper .hg-download-section p {
    margin: 0 0 14px !important;
}

/* Download buttons horizontal */
.hg-connect-wrapper .hg-download-buttons {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.hg-connect-wrapper .hg-download-buttons .hg-button {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 38px !important;
    padding: 7px 10px !important;
    font-size: 12px !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}
/* ============================================================
   MANAGER COMMUNITY FILTERS & STATUS BADGES (PC/Laptop)
   ============================================================ */

/* --- FILTER TABS --- */
.hg-connect-wrapper .hg-status-filter {
    display: flex !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    margin: 15px 0 18px !important;
    padding-bottom: 10px !important;
    border-bottom: 2px solid #e9ecef !important;
}

.hg-connect-wrapper .hg-filter-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 6px 20px !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    border: 2px solid #d9e6f8 !important;
    background: #ffffff !important;
    color: #5f6f89 !important;
    transition: all 0.25s ease !important;
    cursor: pointer !important;
    min-height: 38px !important;
}

.hg-connect-wrapper .hg-filter-btn:hover {
    border-color: #7fb5ff !important;
    color: #001d6e !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 8px rgba(0, 29, 110, 0.08) !important;
}

/* All - toujours bleu Hod-Gee */
.hg-connect-wrapper .hg-filter-btn.hg-filter-all {
    background: #001d6e !important;
    border-color: #001d6e !important;
    color: #ffffff !important;
}

.hg-connect-wrapper .hg-filter-btn.hg-filter-all:hover {
    background: #002a8a !important;
    border-color: #002a8a !important;
}

/* Active - vert pale, devient vert foncé au survol/actif */
.hg-connect-wrapper .hg-filter-btn.hg-filter-active {
    background: #d4edda !important;
    border-color: #28a745 !important;
    color: #155724 !important;
}

.hg-connect-wrapper .hg-filter-btn.hg-filter-active:hover {
    background: #28a745 !important;
    border-color: #28a745 !important;
    color: #ffffff !important;
}

/* Inactive - rouge pale, devient rouge foncé au survol/actif */
.hg-connect-wrapper .hg-filter-btn.hg-filter-inactive {
    background: #f8d7da !important;
    border-color: #dc3545 !important;
    color: #721c24 !important;
}

.hg-connect-wrapper .hg-filter-btn.hg-filter-inactive:hover {
    background: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #ffffff !important;
}

.hg-connect-wrapper .hg-filter-count {
    display: inline-block !important;
    background: rgba(255,255,255,0.3) !important;
    padding: 0 10px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    margin-left: 5px !important;
}

.hg-connect-wrapper .hg-filter-all .hg-filter-count {
    background: rgba(255,255,255,0.25) !important;
}

/* --- TABLE WRAPPER --- */
.hg-connect-wrapper .hg-community-table-wrap {
    background: #ffffff !important;
    border: 1px solid #e9ecef !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    margin-bottom: 15px !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important;
}

/* --- TABLE HEADER --- */
.hg-connect-wrapper .hg-community-table-header {
    display: grid !important;
    grid-template-columns: 2fr 1fr 1fr 1.8fr !important;
    gap: 0 !important;
    background: #f0f4f8 !important;
    padding: 12px 18px !important;
    border-bottom: 2px solid #d9e6f8 !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    color: #001d6e !important;
    letter-spacing: 0.3px !important;
    text-transform: uppercase !important;
}

.hg-connect-wrapper .hg-community-table-header .hg-col-community {
    padding-right: 10px !important;
}

.hg-connect-wrapper .hg-community-table-header .hg-col-status {
    text-align: center !important;
}

.hg-connect-wrapper .hg-community-table-header .hg-col-members {
    text-align: center !important;
}

.hg-connect-wrapper .hg-community-table-header .hg-col-actions {
    text-align: right !important;
}

/* --- TABLE BODY --- */
.hg-connect-wrapper .hg-community-table-body {
    background: #ffffff !important;
}

/* --- COMMUNITY ROW --- */
.hg-connect-wrapper .hg-community-row {
    display: grid !important;
    grid-template-columns: 2fr 1fr 1fr 1.8fr !important;
    gap: 0 !important;
    padding: 10px 18px !important;
    border-bottom: 1px solid #f0f0f0 !important;
    align-items: center !important;
    transition: background 0.2s ease !important;
}

.hg-connect-wrapper .hg-community-row:last-child {
    border-bottom: none !important;
}

.hg-connect-wrapper .hg-community-row:hover {
    background: #f8f9fa !important;
}

/* Ligne inactive */
.hg-connect-wrapper .hg-community-row.hg-community-inactive {
    background: #fef9fa !important;
    opacity: 0.85 !important;
}

.hg-connect-wrapper .hg-community-row.hg-community-inactive:hover {
    background: #fef0f0 !important;
}

/* --- COLUMN: Community --- */
.hg-connect-wrapper .hg-col-community .hg-community-name-wrap {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
}

.hg-connect-wrapper .hg-col-community .hg-community-name {
    font-size: 14px !important;
    color: #001d6e !important;
    font-weight: 600 !important;
}

.hg-connect-wrapper .hg-col-community .hg-indicator {
    background: #001d6e !important;
    color: #ffffff !important;
    padding: 1px 10px !important;
    border-radius: 999px !important;
    font-size: 10px !important;
    font-weight: 600 !important;
}

/* Petit badge (icône seulement) */
.hg-connect-wrapper .hg-status-badge-small {
    display: inline-flex !important;
    font-size: 12px !important;
    margin-left: 4px !important;
}

/* --- COLUMN: Status (grand badge) --- */
.hg-connect-wrapper .hg-col-status {
    text-align: center !important;
}

.hg-connect-wrapper .hg-status-badge {
    display: inline-flex !important;
    align-items: center !important;
    padding: 3px 14px !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    gap: 4px !important;
}

/* Active - vert pale */
.hg-connect-wrapper .hg-status-badge.hg-status-active {
    background: #d4edda !important;
    color: #155724 !important;
}

/* Inactive - rouge pale */
.hg-connect-wrapper .hg-status-badge.hg-status-inactive {
    background: #f8d7da !important;
    color: #721c24 !important;
}

/* --- COLUMN: Members --- */
.hg-connect-wrapper .hg-col-members {
    text-align: center !important;
    font-size: 13px !important;
    color: #5f6f89 !important;
}

.hg-connect-wrapper .hg-members-count {
    display: inline-block !important;
}

.hg-connect-wrapper .hg-pending-count {
    display: inline-block !important;
    margin-left: 8px !important;
    background: #fff3cd !important;
    color: #856404 !important;
    padding: 0 10px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
}

/* --- COLUMN: Actions --- */
.hg-connect-wrapper .hg-col-actions {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 5px !important;
    flex-wrap: wrap !important;
}

/* Boutons d'action - TOUS DE MÊME TAILLE */
.hg-connect-wrapper .hg-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 2px 12px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    height: 30px !important;
    min-height: 30px !important;
    border-radius: 4px !important;
    border: 1px solid transparent !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    gap: 4px !important;
}

.hg-connect-wrapper .hg-btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

/* View button */
.hg-connect-wrapper .hg-btn-view {
    background: #c4ddff !important;
    border-color: #c4ddff !important;
    color: #001d6e !important;
}

.hg-connect-wrapper .hg-btn-view:hover {
    background: #7fb5ff !important;
    border-color: #7fb5ff !important;
}

/* Add button */
.hg-connect-wrapper .hg-btn-add {
    background: #28a745 !important;
    border-color: #28a745 !important;
    color: #ffffff !important;
}

.hg-connect-wrapper .hg-btn-add:hover {
    background: #218838 !important;
    border-color: #218838 !important;
}

/* Copy button */
.hg-connect-wrapper .hg-btn-copy {
    background: #001d6e !important;
    border-color: #001d6e !important;
    color: #ffffff !important;
}

.hg-connect-wrapper .hg-btn-copy:hover {
    background: #002a8a !important;
    border-color: #002a8a !important;
}

/* Reactivate button */
.hg-connect-wrapper .hg-btn-reactivate {
    background: #ffc107 !important;
    border-color: #ffc107 !important;
    color: #001d6e !important;
}

.hg-connect-wrapper .hg-btn-reactivate:hover {
    background: #e0a800 !important;
    border-color: #e0a800 !important;
}

/* --- EMPTY STATE --- */
.hg-connect-wrapper .hg-empty-state {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 50px 20px !important;
    text-align: center !important;
    gap: 14px !important;
}

.hg-connect-wrapper .hg-empty-icon {
    font-size: 52px !important;
    opacity: 0.6 !important;
}

.hg-connect-wrapper .hg-empty-message {
    font-size: 16px !important;
    color: #6c757d !important;
    margin: 0 !important;
}

/* --- SUMMARY BOX --- */
.hg-connect-wrapper .hg-summary-box {
    display: flex !important;
    gap: 24px !important;
    flex-wrap: wrap !important;
    padding: 10px 18px !important;
    background: #f0f4f8 !important;
    border-radius: 8px !important;
    border: 1px solid #e9ecef !important;
    font-size: 13px !important;
    margin-top: 10px !important;
}

.hg-connect-wrapper .hg-summary-label {
    font-weight: 700 !important;
    color: #001d6e !important;
}

.hg-connect-wrapper .hg-summary-item {
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
}

.hg-connect-wrapper .hg-summary-item.hg-summary-active {
    color: #28a745 !important;
}

.hg-connect-wrapper .hg-summary-item.hg-summary-inactive {
    color: #dc3545 !important;
}

.hg-connect-wrapper .hg-summary-item.hg-summary-all {
    color: #001d6e !important;
}