/* ============================================================
   CONNECT PAGE - WELCOME CARDS & HERO
   Only for the main Connect page (not dashboard, not public profile)
   ============================================================ */

/* ============================================
   WELCOME TITLE BOX
   ============================================ */

.hg-connect-wrapper .hg-welcome .hg-welcome-title-box {
    display: inline-block !important;
    padding: 16px 40px !important;
    background: linear-gradient(135deg, #e8f0fe 0%, #d4e4f7 100%) !important;
    border: 2px solid rgba(127, 181, 255, 0.3) !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 24px rgba(0, 29, 110, 0.08) !important;
    font-size: clamp(24px, 4vw, 36px) !important;
    font-weight: 800 !important;
    color: #001d6e !important;
    text-align: center !important;
    letter-spacing: -0.5px !important;
    position: relative !important;
    margin: 0 auto 20px !important;
}

.hg-connect-wrapper .hg-welcome .hg-welcome-title-box span {
    color: #2f80ed !important;
    position: relative !important;
}

.hg-connect-wrapper .hg-welcome .hg-welcome-title-box span::after {
    content: '' !important;
    position: absolute !important;
    bottom: 2px !important;
    left: 0 !important;
    right: 0 !important;
    height: 4px !important;
    background: #fee2c5 !important;
    border-radius: 2px !important;
    opacity: 0.5 !important;
}

.hg-connect-wrapper .hg-welcome .hg-welcome-title-box::before,
.hg-connect-wrapper .hg-welcome .hg-welcome-title-box::after {
    content: '✦' !important;
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 16px !important;
    color: #7fb5ff !important;
    opacity: 0.6 !important;
}

.hg-connect-wrapper .hg-welcome .hg-welcome-title-box::before {
    left: 12px !important;
}

.hg-connect-wrapper .hg-welcome .hg-welcome-title-box::after {
    right: 12px !important;
}

/* ============================================
   WELCOME SECTION
   ============================================ */

.hg-connect-wrapper .hg-welcome {
    background: linear-gradient(145deg, #e8f0fe 0%, #d4e4f7 100%) !important;
    padding: 40px 30px 50px !important;
    border-radius: 20px !important;
    box-shadow: 0 8px 40px rgba(0, 29, 110, 0.08) !important;
    margin-bottom: 10px !important;
    position: relative !important;
    overflow: hidden !important;
    text-align: center !important;
}

.hg-connect-wrapper .hg-welcome::before {
    content: '' !important;
    position: absolute !important;
    top: -80px !important;
    right: -80px !important;
    width: 300px !important;
    height: 300px !important;
    background: radial-gradient(circle, rgba(127, 181, 255, 0.15) 0%, transparent 70%) !important;
    border-radius: 50% !important;
    pointer-events: none !important;
}

.hg-connect-wrapper .hg-welcome::after {
    content: '' !important;
    position: absolute !important;
    bottom: -60px !important;
    left: -60px !important;
    width: 250px !important;
    height: 250px !important;
    background: radial-gradient(circle, rgba(254, 226, 197, 0.20) 0%, transparent 70%) !important;
    border-radius: 50% !important;
    pointer-events: none !important;
}

.hg-connect-wrapper .hg-welcome h2 {
    color: #001d6e !important;
    font-size: 32px !important;
    font-weight: 800 !important;
    margin: 0 0 6px 0 !important;
    line-height: 1.2 !important;
    position: relative !important;
    z-index: 1 !important;
    letter-spacing: -0.5px !important;
}

.hg-connect-wrapper .hg-welcome > p {
    color: #3d5a78 !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    max-width: 600px !important;
    margin: 0 auto 30px !important;
    line-height: 1.6 !important;
    position: relative !important;
    z-index: 1 !important;
}

/* ============================================
   WELCOME CARDS GRID
   ============================================ */

.hg-connect-wrapper .hg-welcome .hg-welcome-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
    max-width: 1100px !important;
    margin: 0 auto !important;
    position: relative !important;
    z-index: 1 !important;
    align-items: stretch !important;
}

.hg-connect-wrapper .hg-welcome .hg-card {
    display: flex !important;
    flex-direction: column !important;
    text-align: center !important;
    padding: 24px 20px 20px !important;
    height: 100% !important;
    background: #ffffff !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 16px rgba(0, 29, 110, 0.06) !important;
    border: 1px solid rgba(217, 230, 248, 0.5) !important;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    position: relative !important;
    overflow: hidden !important;
}

.hg-connect-wrapper .hg-welcome .hg-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 12px 40px rgba(0, 29, 110, 0.12) !important;
    border-color: #7fb5ff !important;
}

.hg-connect-wrapper .hg-welcome .hg-card::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 4px !important;
    border-radius: 16px 16px 0 0 !important;
}

.hg-connect-wrapper .hg-welcome .hg-card-join::before {
    background: linear-gradient(90deg, #001d6e, #4a8fd8) !important;
}

.hg-connect-wrapper .hg-welcome .hg-card-save::before {
    background: linear-gradient(90deg, #7fb5ff, #c4ddff) !important;
}

.hg-connect-wrapper .hg-welcome .hg-card-member::before {
    background: linear-gradient(90deg, #28a745, #5dd47a) !important;
}

.hg-connect-wrapper .hg-welcome .hg-card-manager::before {
    background: linear-gradient(90deg, #f0ad4e, #ffc97a) !important;
}

.hg-connect-wrapper .hg-welcome .hg-card-icon {
    font-size: 36px !important;
    margin-bottom: 12px !important;
    line-height: 1 !important;
    display: block !important;
}

.hg-connect-wrapper .hg-welcome .hg-card h3 {
    color: #001d6e !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    margin: 0 0 8px 0 !important;
    line-height: 1.3 !important;
    min-height: 24px !important;
}

.hg-connect-wrapper .hg-welcome .hg-card > p {
    color: #5f6f89 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    margin: 0 0 16px 0 !important;
    flex: 1 !important;
    min-height: 42px !important;
}

.hg-connect-wrapper .hg-welcome .hg-card-content {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    margin-top: auto !important;
}

.hg-connect-wrapper .hg-welcome .hg-card-hint {
    font-size: 12px !important;
    color: #a0b8d0 !important;
    margin: 6px 0 0 !important;
    line-height: 1.3 !important;
}

/* ============================================
   SEARCH & SELECT
   ============================================ */

.hg-connect-wrapper .hg-welcome .hg-search-wrapper {
    position: relative !important;
    width: 100% !important;
}

.hg-connect-wrapper .hg-welcome .hg-search-wrapper input {
    width: 100% !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 8px 14px 8px 38px !important;
    border: 2px solid #d9e6f8 !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    background: #f8faff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237fb5ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat 12px center !important;
    transition: all 0.3s ease !important;
    color: #001d6e !important;
    box-sizing: border-box !important;
}

.hg-connect-wrapper .hg-welcome .hg-search-wrapper input:focus {
    border-color: #001d6e !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(0, 29, 110, 0.08) !important;
    background-color: #ffffff !important;
}

.hg-connect-wrapper .hg-welcome .hg-search-wrapper input::placeholder {
    color: #a0b8d0 !important;
}

.hg-connect-wrapper .hg-welcome .hg-card-content select {
    width: 100% !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 8px 14px !important;
    border: 2px solid #d9e6f8 !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    background: #ffffff 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") no-repeat right 14px center !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    transition: all 0.3s ease !important;
    color: #001d6e !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
}

.hg-connect-wrapper .hg-welcome .hg-card-content select:focus {
    border-color: #001d6e !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(0, 29, 110, 0.08) !important;
}

.hg-connect-wrapper .hg-welcome .hg-search-empty-msg {
    display: none !important;
    background: #fff3cd !important;
    color: #856404 !important;
    padding: 6px 12px !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    margin-top: 6px !important;
}

.hg-connect-wrapper .hg-welcome .hg-search-empty-msg.is-visible {
    display: block !important;
}

/* ============================================
   JOIN / VIEW ROW
   ============================================ */

.hg-connect-wrapper .hg-welcome .hg-join-view-row {
    width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
}

.hg-connect-wrapper .hg-welcome .hg-join-view-row .hg-btn-join,
.hg-connect-wrapper .hg-welcome .hg-join-view-row .hg-btn-view {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 10px !important;
    font-size: 13px !important;
    line-height: 1.1 !important;
    border-radius: 10px !important;
    white-space: nowrap !important;
}

/* ============================================
   BUTTONS - Welcome scope
   ============================================ */

.hg-connect-wrapper .hg-welcome .hg-button {
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 18px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.hg-connect-wrapper .hg-welcome .hg-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 29, 110, 0.15) !important;
}

.hg-connect-wrapper .hg-welcome .hg-button:active {
    transform: translateY(0) scale(0.98) !important;
}

.hg-connect-wrapper .hg-welcome .hg-btn-login,
.hg-connect-wrapper .hg-welcome .hg-btn-save,
.hg-connect-wrapper .hg-welcome .hg-btn-join {
    background: #001d6e !important;
    color: #ffffff !important;
}

.hg-connect-wrapper .hg-welcome .hg-btn-login:hover,
.hg-connect-wrapper .hg-welcome .hg-btn-save:hover,
.hg-connect-wrapper .hg-welcome .hg-btn-join:hover {
    background: #002a8a !important;
}

.hg-connect-wrapper .hg-welcome .hg-btn-register,
.hg-connect-wrapper .hg-welcome .hg-btn-view {
    background: #e8f0fe !important;
    color: #001d6e !important;
}

.hg-connect-wrapper .hg-welcome .hg-btn-register:hover,
.hg-connect-wrapper .hg-welcome .hg-btn-view:hover {
    background: #d4e4f7 !important;
}

.hg-connect-wrapper .hg-welcome .hg-btn-apply,
.hg-connect-wrapper .hg-welcome .hg-btn-login-apply {
    background: #fee2c5 !important;
    color: #001d6e !important;
}

.hg-connect-wrapper .hg-welcome .hg-btn-apply:hover,
.hg-connect-wrapper .hg-welcome .hg-btn-login-apply:hover {
    background: #fdd6b0 !important;
}

.hg-connect-wrapper .hg-welcome .hg-card-member .hg-btn-login,
.hg-connect-wrapper .hg-welcome .hg-card-member .hg-btn-register {
    width: 100% !important;
}

/* ============================================
   INFO BOXES & LINKS
   ============================================ */

.hg-connect-wrapper .hg-welcome .hg-info-box {
    background: #f8f9fa !important;
    padding: 12px 16px !important;
    border-radius: 8px !important;
    border-left: 4px solid #6c757d !important;
}

.hg-connect-wrapper .hg-welcome .hg-info-box p {
    margin: 0 !important;
    color: #6c757d !important;
}

.hg-connect-wrapper .hg-welcome .hg-register-link {
    cursor: pointer !important;
    color: var(--hg-primary) !important;
    text-decoration: none !important;
    font-weight: 600 !important;
}

.hg-connect-wrapper .hg-welcome .hg-register-link:hover {
    text-decoration: underline !important;
}

/* ============================================
   ADMIN PREVIEW NOTICE
   ============================================ */

.hg-connect-wrapper .hg-welcome .hg-admin-preview-notice {
    margin: 20px 20px 0 !important;
    padding: 15px 20px !important;
    background: #fff3cd !important;
    border-radius: 8px !important;
    border-left: 4px solid #ffc107 !important;
    text-align: center !important;
    color: #856404 !important;
}

.hg-connect-wrapper .hg-welcome .hg-admin-preview-notice span {
    font-weight: 600 !important;
}

.hg-connect-wrapper .hg-welcome .hg-preview-separator {
    margin: 0 15px !important;
    color: #6c757d !important;
}

.hg-connect-wrapper .hg-welcome .hg-preview-switch-link {
    color: var(--hg-primary) !important;
    text-decoration: none !important;
    font-weight: 600 !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet - 2 columns */
@media (max-width: 1024px) {
    .hg-connect-wrapper .hg-welcome .hg-welcome-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        max-width: 760px !important;
        gap: 16px !important;
    }
}

/* Mobile - 1 column */
@media (max-width: 768px) {
    .hg-connect-wrapper .hg-welcome {
        width: calc(100vw - 19px) !important;
        max-width: calc(100vw - 19px) !important;
        min-width: 0 !important;
        margin-left: calc(50% - 50vw + 9.5px) !important;
        margin-right: calc(50% - 50vw + 9.5px) !important;
        padding: 30px 18px 35px !important;
        border-radius: 14px !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    .hg-connect-wrapper .hg-welcome .hg-welcome-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
        max-width: 100% !important;
        margin: 20px auto !important;
    }

    .hg-connect-wrapper .hg-welcome .hg-welcome-title-box {
        padding: 12px 24px !important;
        font-size: clamp(20px, 5vw, 28px) !important;
        border-radius: 12px !important;
        margin: 0 auto 16px !important;
    }

    .hg-connect-wrapper .hg-welcome .hg-welcome-title-box::before,
    .hg-connect-wrapper .hg-welcome .hg-welcome-title-box::after {
        display: none !important;
    }

    .hg-connect-wrapper .hg-welcome h2 {
        font-size: 24px !important;
    }

    .hg-connect-wrapper .hg-welcome > p {
        font-size: 15px !important;
        margin-bottom: 20px !important;
    }

    .hg-connect-wrapper .hg-welcome .hg-card {
        padding: 18px 16px 16px !important;
    }

    .hg-connect-wrapper .hg-welcome .hg-card-icon {
        font-size: 28px !important;
        margin-bottom: 8px !important;
    }

    .hg-connect-wrapper .hg-welcome .hg-card h3 {
        font-size: 16px !important;
        min-height: auto !important;
    }

    .hg-connect-wrapper .hg-welcome .hg-card > p {
        font-size: 13px !important;
        min-height: auto !important;
        margin-bottom: 12px !important;
    }

    .hg-connect-wrapper .hg-welcome .hg-search-wrapper input,
    .hg-connect-wrapper .hg-welcome .hg-card-content select,
    .hg-connect-wrapper .hg-welcome .hg-button {
        height: 38px !important;
        min-height: 38px !important;
        font-size: 13px !important;
        padding: 6px 12px !important;
    }

    .hg-connect-wrapper .hg-welcome .hg-search-wrapper input {
        padding-left: 34px !important;
        background-position: 10px center !important;
        background-size: 14px !important;
    }

    .hg-connect-wrapper .hg-welcome .hg-card-content select {
        padding-right: 34px !important;
        background-position: right 10px center !important;
    }

    .hg-connect-wrapper .hg-welcome .hg-join-view-row {
        gap: 6px !important;
    }

    .hg-connect-wrapper .hg-welcome .hg-join-view-row .hg-btn-join,
    .hg-connect-wrapper .hg-welcome .hg-join-view-row .hg-btn-view {
        height: 38px !important;
        min-height: 38px !important;
        font-size: 12px !important;
        padding: 0 8px !important;
    }
}

/* Small mobile (max-width: 480px) */
@media (max-width: 480px) {
    .hg-connect-wrapper .hg-welcome {
        padding: 24px 14px 28px !important;
        border-radius: 12px !important;
    }

    .hg-connect-wrapper .hg-welcome .hg-welcome-title-box {
        padding: 10px 16px !important;
        font-size: clamp(16px, 5vw, 22px) !important;
        border-radius: 10px !important;
        margin: 0 auto 12px !important;
    }

    .hg-connect-wrapper .hg-welcome h2 {
        font-size: 20px !important;
    }

    .hg-connect-wrapper .hg-welcome > p {
        font-size: 14px !important;
        margin-bottom: 16px !important;
    }

    .hg-connect-wrapper .hg-welcome .hg-card {
        padding: 14px 12px 12px !important;
        border-radius: 12px !important;
    }

    .hg-connect-wrapper .hg-welcome .hg-card-icon {
        font-size: 24px !important;
        margin-bottom: 6px !important;
    }

    .hg-connect-wrapper .hg-welcome .hg-card h3 {
        font-size: 14px !important;
    }

    .hg-connect-wrapper .hg-welcome .hg-card > p {
        font-size: 12px !important;
    }

    .hg-connect-wrapper .hg-welcome .hg-search-wrapper input,
    .hg-connect-wrapper .hg-welcome .hg-card-content select,
    .hg-connect-wrapper .hg-welcome .hg-button {
        height: 34px !important;
        min-height: 34px !important;
        font-size: 12px !important;
        padding: 5px 10px !important;
        border-radius: 8px !important;
    }

    .hg-connect-wrapper .hg-welcome .hg-search-wrapper input {
        padding-left: 30px !important;
        background-position: 8px center !important;
        background-size: 12px !important;
    }

    .hg-connect-wrapper .hg-welcome .hg-card-content select {
        padding-right: 30px !important;
        background-position: right 8px center !important;
    }

    .hg-connect-wrapper .hg-welcome .hg-join-view-row {
        gap: 6px !important;
    }

    .hg-connect-wrapper .hg-welcome .hg-join-view-row .hg-btn-join,
    .hg-connect-wrapper .hg-welcome .hg-join-view-row .hg-btn-view {
        height: 34px !important;
        min-height: 34px !important;
        font-size: 11px !important;
        padding: 0 6px !important;
    }

    .hg-connect-wrapper .hg-welcome .hg-card-hint {
        font-size: 10px !important;
    }
}

/* Extra small (max-width: 360px) */
@media (max-width: 360px) {
    .hg-connect-wrapper .hg-welcome .hg-join-view-row {
        flex-direction: column !important;
        gap: 5px !important;
    }

    .hg-connect-wrapper .hg-welcome .hg-join-view-row .hg-btn-join,
    .hg-connect-wrapper .hg-welcome .hg-join-view-row .hg-btn-view {
        width: 100% !important;
        flex: none !important;
    }

    .hg-connect-wrapper .hg-welcome h2 {
        font-size: 18px !important;
    }
}

/* ============================================
   FINAL LOCK
   ============================================ */

.hg-connect-wrapper .hg-welcome *,
.hg-connect-wrapper .hg-welcome *::before,
.hg-connect-wrapper .hg-welcome *::after {
    box-sizing: border-box !important;
}

.hg-connect-wrapper .hg-welcome .hg-card,
.hg-connect-wrapper .hg-welcome .hg-card-content,
.hg-connect-wrapper .hg-welcome .hg-search-wrapper,
.hg-connect-wrapper .hg-welcome .hg-join-view-row {
    overflow-x: hidden !important;
}