/* ==========================================================================
   System Floating Hub Styles (Glassmorphism & Accordion Stack & Multi-purpose)
   ========================================================================== */

#system-floating-hub {
    position: fixed;
    bottom: calc(24 * var(--ws-unit, 1px));
    right: calc(24 * var(--ws-unit, 1px));
    z-index: 99999;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--theme-text-emphasis, #ffffff);
    pointer-events: none;
    width: calc(380 * var(--ws-unit, 1px));
    height: 0;
}

/* Floating circle button view */
.hub_min_circle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: calc(42 * var(--ws-unit, 1px));
    height: calc(42 * var(--ws-unit, 1px));
    border-radius: 50%;
    cursor: pointer;
    background: var(--theme-surface-active, #d3d3d3);
    border: calc(1 * var(--ws-unit, 1px)) solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 calc(4 * var(--ws-unit, 1px)) calc(16 * var(--ws-unit, 1px)) var(--theme-shadow, rgba(0, 0, 0, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        background-color 0.3s,
        border-color 0.3s,
        box-shadow 0.3s;
}

#system-floating-hub.minimized:hover .hub_min_circle {
    background: var(--theme-surface-hover, #bcbcbc);
    transform: scale(1.05);
}

#system-floating-hub.minimized:active .hub_min_circle,
.hub_min_circle:active {
    transform: scale(0.92) !important;
}

#system-floating-hub.expanded .hub_min_circle {
    opacity: 0;
    transform: scale(0.6) rotate(-45deg);
    pointer-events: none;
    visibility: hidden;
}

.hub_min_icon {
    font-size: calc(24 * var(--ws-unit, 1px));
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hub_min_img_icon {
    width: calc(24 * var(--ws-unit, 1px));
    height: calc(24 * var(--ws-unit, 1px));
    object-fit: contain;
    display: block;
    pointer-events: none;
}

.hub_min_img_icon.hub_ai_large {
    width: calc(40 * var(--ws-unit, 1px));
    height: calc(40 * var(--ws-unit, 1px));
}

.hub_upload_icon_wrapper {
    position: relative;
    width: calc(26 * var(--ws-unit, 1px));
    height: calc(26 * var(--ws-unit, 1px));
    display: flex;
    align-items: center;
    justify-content: center;
}

.hub_upload_icon_wrapper .hub_upload_bg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.hub_upload_icon_wrapper .hub_upload_badge {
    position: absolute;
    width: calc(13 * var(--ws-unit, 1px));
    height: calc(13 * var(--ws-unit, 1px));
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: contain;
    z-index: 2;
}

.hub_upload_icon_wrapper .hub_upload_badge.checkmark_badge {
    width: calc(12 * var(--ws-unit, 1px));
    height: calc(12 * var(--ws-unit, 1px));
    top: 54%;
    left: 50%;
}

#system-floating-hub.minimized.active-pulse .hub_min_circle {
    animation: none;
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 calc(4 * var(--ws-unit, 1px)) calc(16 * var(--ws-unit, 1px)) var(--theme-shadow, rgba(0, 0, 0, 0.15)), 0 0 calc(10 * var(--ws-unit, 1px)) rgba(139, 92, 246, 0.2);
}

@keyframes hub-border-glow {
    0% {
        border-color: rgba(139, 92, 246, 0.2);
        box-shadow: 0 calc(4 * var(--ws-unit, 1px)) calc(16 * var(--ws-unit, 1px)) var(--theme-shadow, rgba(0, 0, 0, 0.15));
    }

    50% {
        border-color: rgba(139, 92, 246, 0.8);
        box-shadow: 0 calc(4 * var(--ws-unit, 1px)) calc(20 * var(--ws-unit, 1px)) rgba(139, 92, 246, 0.4), 0 0 calc(10 * var(--ws-unit, 1px)) rgba(139, 92, 246, 0.2);
    }

    100% {
        border-color: rgba(139, 92, 246, 0.2);
        box-shadow: 0 calc(4 * var(--ws-unit, 1px)) calc(16 * var(--ws-unit, 1px)) var(--theme-shadow, rgba(0, 0, 0, 0.15));
    }
}

.hub_upload_icon_wrapper .hub_upload_badge.hub_arrow_animate {
    animation: hub-arrow-upload 3.2s infinite cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes hub-arrow-upload {
    0% {
        transform: translate(-50%, calc(14 * var(--ws-unit, 1px))) scale(1, 1);
        opacity: 0;
    }

    6% {
        transform: translate(-50%, calc(20 * var(--ws-unit, 1px))) scale(1.2, 0.6);
        opacity: 0.3;
    }

    16% {
        transform: translate(-50%, -25%) scale(0.85, 1.25);
        opacity: 1;
    }

    24% {
        transform: translate(-50%, -58%) scale(0.92, 1.12);
        opacity: 1;
    }

    29% {
        transform: translate(-50%, -47%) scale(1.04, 0.93);
        opacity: 1;
    }

    33% {
        transform: translate(-50%, -50%) scale(1, 1);
        opacity: 1;
    }

    60% {
        transform: translate(-50%, -50%) scale(1, 1);
        opacity: 1;
    }

    66% {
        transform: translate(-50%, -15%) scale(1.2, 0.7);
        opacity: 1;
    }

    78% {
        transform: translate(-50%, calc(-28 * var(--ws-unit, 1px))) scale(0.8, 1.3);
        opacity: 0;
    }

    82% {
        transform: translate(-50%, calc(14 * var(--ws-unit, 1px))) scale(1, 1);
        opacity: 0;
    }

    100% {
        transform: translate(-50%, calc(14 * var(--ws-unit, 1px))) scale(1, 1);
        opacity: 0;
    }
}

.hub_badge {
    position: absolute;
    top: calc(-2 * var(--ws-unit, 1px));
    right: calc(-2 * var(--ws-unit, 1px));
    background: #8b5cf6;
    color: white;
    font-size: calc(11 * var(--ws-unit, 1px));
    font-weight: 700;
    min-width: calc(18 * var(--ws-unit, 1px));
    height: calc(18 * var(--ws-unit, 1px));
    border-radius: calc(9 * var(--ws-unit, 1px));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 calc(4 * var(--ws-unit, 1px));
    box-shadow: 0 calc(2 * var(--ws-unit, 1px)) calc(8 * var(--ws-unit, 1px)) rgba(139, 92, 246, 0.5);
}

/* Expanded list panel container */
.hub_expanded_content {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    max-height: calc(100vh - calc(48 * var(--ws-unit, 1px)));
    display: flex;
    flex-direction: column;
    gap: calc(12 * var(--ws-unit, 1px));
    align-items: flex-end;
    justify-content: flex-end;
    pointer-events: none;
    opacity: 0;
    transform: translateY(calc(30 * var(--ws-unit, 1px))) scale(0.95);
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
        transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
        visibility 0.4s;
}

#system-floating-hub.expanded .hub_expanded_content {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    visibility: visible;
}

/* Individual card styling */
.hub_stack_card {
    pointer-events: auto;
    width: 100%;
    background: transparent;
    backdrop-filter: blur(calc(25 * var(--ws-unit, 1px))) saturate(180%);
    -webkit-backdrop-filter: blur(calc(25 * var(--ws-unit, 1px))) saturate(180%);
    border: calc(1 * var(--ws-unit, 1px)) solid rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.07);
    border-radius: calc(14 * var(--ws-unit, 1px));
    box-shadow: 0 calc(8 * var(--ws-unit, 1px)) calc(32 * var(--ws-unit, 1px)) 0 var(--theme-shadow, rgba(0, 0, 0, 0.25));
    opacity: 0;
    transform: translateY(calc(20 * var(--ws-unit, 1px)));
    transition: opacity 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
        transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Staggered entry transition delays when expanded */
#system-floating-hub.expanded .notice_section {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.05s;
}

#system-floating-hub.expanded .upload_section {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.1s;
}

#system-floating-hub.expanded .ai_section {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.15s;
}

/* Simultaneous close transition when minimized */
#system-floating-hub.minimized .hub_stack_card {
    transition-delay: 0s !important;
    opacity: 0;
    transform: translateY(calc(20 * var(--ws-unit, 1px)));
}

.hub_section_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(12 * var(--ws-unit, 1px)) calc(16 * var(--ws-unit, 1px));
    background: rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.02);
    cursor: pointer;
    user-select: none;
    font-size: var(--font-size-base, calc(14 * var(--ws-unit, 1px)));
    font-weight: 600;
    transition: background-color 0.2s;
}

.hub_section_title {
    font-size: var(--font-size-base, calc(14 * var(--ws-unit, 1px)));
}

.hub_section_header:hover {
    background: rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.05);
}

.hub_section_header_left {
    display: flex;
    align-items: center;
    gap: calc(8 * var(--ws-unit, 1px));
}

.hub_section_header_right {
    display: flex;
    align-items: center;
    gap: calc(8 * var(--ws-unit, 1px));
}

.hub_section_arrow {
    width: calc(10 * var(--ws-unit, 1px));
    height: calc(10 * var(--ws-unit, 1px));
    opacity: 0.55;
    transition: transform 0.2s ease, opacity 0.2s ease;
    display: inline-block;
}

.hub_section_header:hover .hub_section_arrow {
    opacity: 0.95;
}

.hub_section_header.collapsed .hub_section_arrow {
    transform: rotate(-90deg);
}

.hub_section_body {
    padding: calc(12 * var(--ws-unit, 1px)) calc(16 * var(--ws-unit, 1px));
    height: calc(250 * var(--ws-unit, 1px));
    overflow-y: auto;
    transition: height 0.3s cubic-bezier(0, 1, 0, 1), padding 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}

.hub_section_body.collapsed {
    height: 0 !important;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* Hide browser default scrollbar for hub section body */
.hub_section_body::-webkit-scrollbar {
    display: none;
}

/* Section Resizer Styles */
.hub_width_resizer { display: none; }
@media (hover: hover) and (pointer: fine) {
    #system-floating-hub {
        width: min(calc(var(--hub-custom-width, 380) * var(--ws-unit, 1px)), calc(100vw - 40 * var(--ws-unit, 1px)));
    }
    #system-floating-hub.expanded .hub_width_resizer {
        display: block; position: absolute; left: 0; top: calc(8 * var(--ws-unit, 1px)); bottom: 0;
        width: calc(8 * var(--ws-unit, 1px)); cursor: ew-resize; z-index: 101; background: transparent;
    }
    #system-floating-hub.width-resizing,
    #system-floating-hub.width-resizing * { cursor: ew-resize !important; user-select: none; }
}
.hub_resizer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(8 * var(--ws-unit, 1px));
    cursor: ns-resize;
    background: transparent;
    z-index: 100;
}

.hub_section_body.resizing {
    transition: none !important;
}

.hub_section_body.collapsed~.hub_resizer {
    display: none;
}

/* Hub Section Close Button Style */
.hub_section_close_btn {
    background: transparent;
    border: none;
    color: var(--theme-text-secondary, rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.45));
    font-size: calc(13 * var(--ws-unit, 1px));
    cursor: pointer;
    padding: calc(2 * var(--ws-unit, 1px)) calc(6 * var(--ws-unit, 1px));
    border-radius: calc(4 * var(--ws-unit, 1px));
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hub_section_close_btn:hover {
    color: var(--theme-danger-text, #ef4444);
    background: rgba(239, 68, 68, 0.12);
}

.hub_section_close_btn:active {
    transform: scale(0.92);
}

/* Grid Layout for notice & AI card items - changed to a vertical stack list */
.hub_grid_container {
    display: flex;
    flex-direction: column;
    gap: calc(8 * var(--ws-unit, 1px));
    padding: calc(2 * var(--ws-unit, 1px)) 0;
}


/* AI Chat Container Styles */
#hub-body-ai {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.hub_chat_container {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    gap: calc(12 * var(--ws-unit, 1px));
    overflow: hidden;
}

.hub_chat_messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: calc(12 * var(--ws-unit, 1px));
    padding-right: calc(6 * var(--ws-unit, 1px));
}

.hub_chat_messages::-webkit-scrollbar {
    display: none;
}

.hub_chat_bubble_wrapper {
    display: flex;
    flex-direction: column;
    max-width: 85%;
    animation: hub-chat-fade-in 0.25s ease-out forwards;
}

@keyframes hub-chat-fade-in {
    from {
        opacity: 0;
        transform: translateY(calc(6 * var(--ws-unit, 1px)));
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hub_chat_bubble_wrapper.user {
    align-self: flex-end;
    align-items: flex-end;
}

.hub_chat_bubble_wrapper.ai {
    align-self: flex-start;
    align-items: flex-start;
}

.hub_chat_bubble {
    padding: calc(8 * var(--ws-unit, 1px)) calc(12 * var(--ws-unit, 1px));
    border-radius: calc(12 * var(--ws-unit, 1px));
    font-size: var(--font-size-base, calc(14 * var(--ws-unit, 1px)));
    line-height: 1.5;
    word-break: break-word;
}

.hub_chat_bubble_wrapper.user .hub_chat_bubble {
    background: rgba(139, 92, 246, 0.22);
    border: calc(1 * var(--ws-unit, 1px)) solid rgba(139, 92, 246, 0.4);
    color: var(--theme-text-emphasis, #ffffff);
    border-radius: calc(12 * var(--ws-unit, 1px)) calc(12 * var(--ws-unit, 1px)) 0 calc(12 * var(--ws-unit, 1px));
    box-shadow: 0 calc(2 * var(--ws-unit, 1px)) calc(8 * var(--ws-unit, 1px)) rgba(139, 92, 246, 0.1);
}

.hub_chat_bubble_wrapper.ai .hub_chat_bubble {
    background: rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.05);
    border: calc(1 * var(--ws-unit, 1px)) solid rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.08);
    color: var(--theme-text-primary, #e0e0e0);
    border-radius: calc(12 * var(--ws-unit, 1px)) calc(12 * var(--ws-unit, 1px)) calc(12 * var(--ws-unit, 1px)) 0;
}

.hub_chat_time {
    font-size: calc(10 * var(--ws-unit, 1px));
    color: var(--theme-text-secondary, rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.4));
    margin-top: calc(4 * var(--ws-unit, 1px));
    padding: 0 calc(4 * var(--ws-unit, 1px));
}

.hub_chat_input_box {
    display: flex;
    flex-direction: column;
    background: rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.03);
    border: calc(1 * var(--ws-unit, 1px)) solid rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.08);
    border-radius: calc(12 * var(--ws-unit, 1px));
    padding: calc(8 * var(--ws-unit, 1px)) calc(12 * var(--ws-unit, 1px));
    margin-top: auto;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.hub_chat_input_box:focus-within {
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 calc(8 * var(--ws-unit, 1px)) rgba(139, 92, 246, 0.15);
}

.hub_chat_input_box .hub_chat_input {
    background: transparent;
    border: none;
    color: var(--theme-text-emphasis, #ffffff);
    font-size: var(--font-size-base, calc(14 * var(--ws-unit, 1px)));
    outline: none;
    resize: none;
    width: 100%;
    padding: calc(4 * var(--ws-unit, 1px)) 0;
    line-height: 1.5;
    font-family: inherit;
}

.hub_chat_input_box .hub_chat_input::placeholder {
    color: var(--theme-text-secondary, rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.3));
}

.hub_chat_input_footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: calc(6 * var(--ws-unit, 1px));
    padding-top: calc(6 * var(--ws-unit, 1px));
    border-top: calc(1 * var(--ws-unit, 1px)) solid rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.04);
}

.hub_chat_input_left {
    display: flex;
    align-items: center;
    gap: calc(8 * var(--ws-unit, 1px));
}

.hub_chat_input_right {
    display: flex;
    align-items: center;
    gap: calc(8 * var(--ws-unit, 1px));
}

.hub_chat_opt_btn {
    background: none;
    border: none;
    color: var(--theme-text-secondary, rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.5));
    font-size: calc(18 * var(--ws-unit, 1px));
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(24 * var(--ws-unit, 1px));
    height: calc(24 * var(--ws-unit, 1px));
    border-radius: calc(4 * var(--ws-unit, 1px));
    transition: background 0.2s, color 0.2s;
    line-height: 1;
}

.hub_chat_opt_btn:hover {
    background: rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.06);
    color: var(--theme-text-emphasis, #ffffff);
}

.hub_chat_model_badge {
    font-size: calc(11 * var(--ws-unit, 1px));
    color: var(--theme-text-secondary, rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.5));
    background: rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.05);
    padding: calc(2 * var(--ws-unit, 1px)) calc(8 * var(--ws-unit, 1px));
    border-radius: calc(6 * var(--ws-unit, 1px));
    user-select: none;
    font-weight: 500;
}

.hub_chat_input_box .hub_chat_send_btn {
    background: rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.1);
    border: none;
    border-radius: 50%;
    color: var(--theme-text-emphasis, #ffffff);
    width: calc(22 * var(--ws-unit, 1px));
    height: calc(22 * var(--ws-unit, 1px));
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: calc(11 * var(--ws-unit, 1px));
    font-weight: bold;
    transition: background-color 0.2s, transform 0.1s;
    line-height: 1;
}

.hub_chat_input_box .hub_chat_send_btn img {
    width: calc(10 * var(--ws-unit, 1px));
    height: calc(10 * var(--ws-unit, 1px));
    object-fit: contain;
    display: block;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.hub_chat_input_box .hub_chat_send_btn:hover img {
    opacity: 1;
}

.hub_chat_input_box .hub_chat_send_btn:hover {
    background: #8b5cf6;
}

.hub_chat_input_box .hub_chat_send_btn:active {
    transform: scale(0.9);
}

/* Limo AI Landing Screen Styles */
.hub_ai_landing {
    display: flex;
    flex-direction: column;
    padding: 0;
    color: var(--theme-text-emphasis, #ffffff);
    text-align: left;
}

.hub_ai_landing_title {
    font-size: var(--font-size-lg, calc(18 * var(--ws-unit, 1px)));
    font-weight: 700;
    color: var(--theme-text-emphasis, #ffffff);
    margin: 0 0 calc(6 * var(--ws-unit, 1px)) 0;
    letter-spacing: calc(-0.3 * var(--ws-unit, 1px));
    margin-left: calc(10 * var(--ws-unit, 1px));
}

.hub_ai_landing_subtitle {
    font-size: var(--font-size-base, calc(14 * var(--ws-unit, 1px)));
    color: var(--theme-text-secondary, rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.65));
    margin: 0 0 calc(20 * var(--ws-unit, 1px)) 0;
    line-height: 1.4;
    margin-left: calc(10 * var(--ws-unit, 1px));
}

.hub_ai_suggestions {
    display: flex;
    flex-direction: column;
    gap: calc(4 * var(--ws-unit, 1px));
    width: 100%;
}

.hub_ai_suggestion_item {
    display: flex;
    align-items: center;
    gap: calc(8 * var(--ws-unit, 1px));
    padding: calc(6 * var(--ws-unit, 1px)) calc(6 * var(--ws-unit, 1px));
    border-radius: calc(10 * var(--ws-unit, 1px));
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    user-select: none;
}

.hub_ai_suggestion_item:hover {
    background: rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.05);
}

.hub_ai_suggestion_item:active {
    transform: scale(0.99);
}

.hub_ai_suggestion_icon {
    font-size: calc(16 * var(--ws-unit, 1px));
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(24 * var(--ws-unit, 1px));
    height: calc(24 * var(--ws-unit, 1px));
    flex-shrink: 0;
}

.hub_ai_suggestion_text {
    font-size: var(--font-size-base, calc(14 * var(--ws-unit, 1px)));
    color: var(--theme-text-primary, #cbd5e1);
    font-weight: 500;
}

.hub_ai_suggestion_item:hover .hub_ai_suggestion_text {
    color: var(--theme-text-emphasis, #ffffff);
}

/* AI Header Controls */
.ai_section .hub_section_header_right {
    display: flex;
    align-items: center;
    gap: calc(8 * var(--ws-unit, 1px));
    margin-right: calc(4 * var(--ws-unit, 1px));
}

.hub_ai_header_btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(28 * var(--ws-unit, 1px));
    height: calc(28 * var(--ws-unit, 1px));
    border-radius: 50%;
    color: var(--theme-text-primary, #cbd5e1);
    font-size: calc(19 * var(--ws-unit, 1px));
    font-weight: bold;
    transition: all 0.2s ease;
    padding: 0;
}

.hub_ai_header_btn:hover {
    background: rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.08);
    color: var(--theme-text-emphasis, #ffffff);
    transform: scale(1.05);
}

.hub_ai_header_btn img {
    width: calc(17 * var(--ws-unit, 1px));
    height: calc(17 * var(--ws-unit, 1px));
    object-fit: contain;
    opacity: 0.8;
    transition: opacity 0.2s;
    display: block;
}

.hub_ai_header_btn:hover img {
    opacity: 1;
}

/* History Dropdown */
.hub_ai_history_wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.hub_ai_history_dropdown {
    position: absolute;
    top: calc(100% + calc(8 * var(--ws-unit, 1px)));
    right: 0;
    width: calc(220 * var(--ws-unit, 1px));
    background: var(--theme-surface-panel, #23232c);
    border: calc(1 * var(--ws-unit, 1px)) solid rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.1);
    border-radius: calc(12 * var(--ws-unit, 1px));
    box-shadow: 0 calc(8 * var(--ws-unit, 1px)) calc(24 * var(--ws-unit, 1px)) var(--theme-shadow, rgba(0, 0, 0, 0.4));
    z-index: 1000;
    padding: calc(6 * var(--ws-unit, 1px)) 0;
    display: none;
    flex-direction: column;
}

.hub_ai_history_dropdown.show {
    display: flex;
}

.hub_ai_history_body {
    max-height: calc(160 * var(--ws-unit, 1px));
    overflow-y: auto;
    padding-right: calc(4 * var(--ws-unit, 1px));
    position: relative;
}

.hub_ai_history_body::-webkit-scrollbar {
    display: none;
}

/* History Dropdown Custom Scrollbar Styles */
#hub-ai-history-dropdown .custom-scrollbar-track {
    position: absolute;
    right: calc(2 * var(--ws-unit, 1px));
    top: calc(26 * var(--ws-unit, 1px));
    /* Positioned below the '이전 채팅' header */
    bottom: calc(6 * var(--ws-unit, 1px));
    width: calc(6 * var(--ws-unit, 1px));
    background-color: transparent;
    z-index: 10;
    pointer-events: auto;
}

#hub-ai-history-dropdown .custom-scrollbar-thumb {
    position: absolute;
    right: 0;
    top: 0;
    width: calc(3 * var(--ws-unit, 1px));
    background-color: rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.2);
    border-radius: calc(3 * var(--ws-unit, 1px));
    transition: width 0.2s ease, background-color 0.2s ease;
}

#hub-ai-history-dropdown .custom-scrollbar-track:hover .custom-scrollbar-thumb,
#hub-ai-history-dropdown .custom-scrollbar-thumb.scrolling {
    width: calc(6 * var(--ws-unit, 1px));
    background-color: rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.45);
}

.hub_ai_history_item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: calc(6 * var(--ws-unit, 1px)) calc(8 * var(--ws-unit, 1px));
    gap: calc(8 * var(--ws-unit, 1px));
    cursor: pointer;
    transition: background 0.2s;
}

.hub_ai_history_item:hover {
    background: rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.05);
}

.hub_ai_history_title {
    font-size: calc(11 * var(--ws-unit, 1px));
    color: var(--theme-text-primary, #e2e8f0);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
    font-weight: 500;
}

.hub_ai_history_item:hover .hub_ai_history_title {
    color: var(--theme-text-emphasis, #ffffff);
}

.hub_ai_history_del {
    background: none;
    border: none;
    color: var(--theme-text-secondary, rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.4));
    font-size: calc(13 * var(--ws-unit, 1px));
    cursor: pointer;
    padding: calc(2 * var(--ws-unit, 1px)) calc(4 * var(--ws-unit, 1px));
    border-radius: calc(4 * var(--ws-unit, 1px));
    transition: all 0.2s;
    line-height: 1;
}

.hub_ai_history_del:hover {
    color: var(--theme-danger-text, #ef4444);
    background: rgba(239, 68, 68, 0.1);
}

.hub_ai_history_header {
    font-size: calc(12 * var(--ws-unit, 1px));
    font-weight: 600;
    color: var(--theme-text-secondary, #94a3b8);
    padding: 0px calc(7 * var(--ws-unit, 1px)) calc(6 * var(--ws-unit, 1px)) calc(7 * var(--ws-unit, 1px));
    text-align: left;
}

.hub_ai_history_empty {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: calc(30 * var(--ws-unit, 1px)) calc(14 * var(--ws-unit, 1px));
    min-height: calc(90 * var(--ws-unit, 1px));
}

.hub_ai_history_empty_img {
    width: calc(18 * var(--ws-unit, 1px));
    height: calc(18 * var(--ws-unit, 1px));
    opacity: 0.25;
    object-fit: contain;
}

.hub_chat_send_btn {
    background: #8b5cf6;
    border: none;
    border-radius: calc(8 * var(--ws-unit, 1px));
    color: #ffffff;
    width: calc(32 * var(--ws-unit, 1px));
    height: calc(32 * var(--ws-unit, 1px));
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: calc(14 * var(--ws-unit, 1px));
    transition: background-color 0.2s, transform 0.1s;
}

.hub_chat_send_btn:hover {
    background: #7c3aed;
}

.hub_chat_send_btn:active {
    transform: scale(0.95);
}

/* Typing Dots Loader */
.hub_typing_dots {
    display: inline-flex;
    align-items: center;
    gap: calc(4 * var(--ws-unit, 1px));
    padding: calc(4 * var(--ws-unit, 1px)) calc(6 * var(--ws-unit, 1px));
}

.hub_typing_dots span {
    width: calc(6 * var(--ws-unit, 1px));
    height: calc(6 * var(--ws-unit, 1px));
    background: rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.6);
    border-radius: 50%;
    display: inline-block;
    animation: hub-typing 1.4s infinite ease-in-out both;
}

.hub_typing_dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.hub_typing_dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes hub-typing {

    0%,
    80%,
    100% {
        transform: scale(0.3);
        opacity: 0.3;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Feature Preview Cards in Stack (flex row layout) */
.hub_feature_card {
    background: rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.03);
    border: calc(1 * var(--ws-unit, 1px)) solid var(--border-subtle, rgba(255, 255, 255, 0.08));
    border-radius: var(--radius-md, calc(10 * var(--ws-unit, 1px)));
    padding: calc(12 * var(--ws-unit, 1px));
    transition: all 0.25s ease;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: calc(12 * var(--ws-unit, 1px));
}

.hub_feature_card:hover {
    background: rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.06);
    border-color: rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.1);
    transform: translateY(calc(-2 * var(--ws-unit, 1px)));
}

.hub_card_left {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: calc(4 * var(--ws-unit, 1px));
    min-width: calc(65 * var(--ws-unit, 1px));
    flex-shrink: 0;
}

.hub_card_right {
    display: flex;
    flex-direction: column;
    gap: calc(3 * var(--ws-unit, 1px));
    flex: 1;
    text-align: left;
}

.hub_card_icon {
    font-size: calc(20 * var(--ws-unit, 1px));
}

.hub_card_badge {
    font-size: calc(8 * var(--ws-unit, 1px));
    font-weight: 700;
    padding: calc(1 * var(--ws-unit, 1px)) calc(4 * var(--ws-unit, 1px));
    border-radius: calc(3 * var(--ws-unit, 1px));
    text-transform: uppercase;
    text-align: center;
    width: 100%;
}

.hub_card_title {
    font-size: var(--font-size-base, calc(14 * var(--ws-unit, 1px)));
    font-weight: 600;
    color: var(--theme-text-primary, #e2e8f0);
}

.hub_card_desc {
    font-size: var(--font-size-sm, calc(12 * var(--ws-unit, 1px)));
    color: var(--theme-text-secondary, #94a3b8);
    margin: 0;
    line-height: 1.35;
}

/* Badge colors */
.ai_card .hub_card_badge.beta {
    background: rgba(139, 92, 246, 0.15);
    color: var(--theme-accent-text, #a78bfa);
    border: calc(1 * var(--ws-unit, 1px)) solid rgba(139, 92, 246, 0.3);
}

.ai_card .hub_card_badge.chat {
    background: rgba(16, 185, 129, 0.15);
    color: var(--theme-success-text, #34d399);
    border: calc(1 * var(--ws-unit, 1px)) solid rgba(16, 185, 129, 0.3);
}

.ai_card .hub_card_badge.gen {
    background: rgba(245, 158, 11, 0.15);
    color: var(--theme-warning-text, #fbbf24);
    border: calc(1 * var(--ws-unit, 1px)) solid rgba(245, 158, 11, 0.3);
}

.ai_card .hub_card_badge.data {
    background: rgba(239, 68, 68, 0.15);
    color: var(--theme-danger-text, #f87171);
    border: calc(1 * var(--ws-unit, 1px)) solid rgba(239, 68, 68, 0.3);
}

.notice_card .hub_card_badge.info {
    background: rgba(59, 130, 246, 0.15);
    color: var(--theme-info-text, #60a5fa);
    border: calc(1 * var(--ws-unit, 1px)) solid rgba(59, 130, 246, 0.3);
}

.notice_card .hub_card_badge.speed {
    background: rgba(16, 185, 129, 0.15);
    color: var(--theme-success-text, #34d399);
    border: calc(1 * var(--ws-unit, 1px)) solid rgba(16, 185, 129, 0.3);
}

.notice_card .hub_card_badge.security {
    background: rgba(239, 68, 68, 0.15);
    color: var(--theme-danger-text, #f87171);
    border: calc(1 * var(--ws-unit, 1px)) solid rgba(239, 68, 68, 0.3);
}

.notice_card .hub_card_badge.event {
    background: rgba(236, 72, 153, 0.15);
    color: #f472b6;
    border: calc(1 * var(--ws-unit, 1px)) solid rgba(236, 72, 153, 0.3);
}

/* Upload Summary Bar (Image style) */
.hub_upload_summary_bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 calc(16 * var(--ws-unit, 1px));
    background: rgba(59, 130, 246, 0.12);
    /* 다크 모드에 조화로운 연한 블루 */
    border-bottom: 0px solid rgba(59, 130, 246, 0.18);
    font-size: calc(12 * var(--ws-unit, 1px));
    color: var(--theme-info-text, #93c5fd);
    margin: 0 calc(-16 * var(--ws-unit, 1px));
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    user-select: none;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        padding 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.2s ease,
        margin 0.3s ease,
        border-bottom 0.3s ease;
}

.hub_upload_summary_bar.active {
    padding: calc(8 * var(--ws-unit, 1px)) calc(16 * var(--ws-unit, 1px));
    max-height: calc(40 * var(--ws-unit, 1px));
    opacity: 1;
    margin: calc(-12 * var(--ws-unit, 1px)) calc(-16 * var(--ws-unit, 1px)) calc(12 * var(--ws-unit, 1px)) calc(-16 * var(--ws-unit, 1px));
    border-bottom: calc(1 * var(--ws-unit, 1px)) solid rgba(59, 130, 246, 0.18);
}

.hub_upload_time_left {
    font-weight: 500;
}

.hub_upload_cancel_all {
    background: none;
    border: none;
    color: var(--theme-info-text, #60a5fa);
    font-weight: 600;
    cursor: pointer;
    font-size: calc(12 * var(--ws-unit, 1px));
    padding: 0;
    transition: color 0.2s;
}

.hub_upload_cancel_all:hover {
    color: var(--theme-info-text, #3b82f6);
    text-decoration: underline;
}

.hub_upload_cancel_all.is-close {
    font-size: calc(16 * var(--ws-unit, 1px));
    font-weight: 700;
    color: var(--theme-text-secondary, #a0a0b0);
    transition: color 0.2s, transform 0.2s;
}

.hub_upload_cancel_all.is-close:hover {
    color: var(--theme-danger-text, #ef4444);
    text-decoration: none;
    transform: scale(1.15);
}

/* Upload List Stack */
.hub_upload_list {
    display: flex;
    flex-direction: column;
    gap: calc(8 * var(--ws-unit, 1px));
    max-height: none;
    overflow-y: visible;
    padding-right: calc(4 * var(--ws-unit, 1px));
}

.hub_upload_list::-webkit-scrollbar {
    display: none;
}

/* Hub Specific Custom Scrollbar Styles */
.hub_stack_card .custom-scrollbar-track {
    position: absolute;
    right: calc(4 * var(--ws-unit, 1px));
    top: calc(42 * var(--ws-unit, 1px));
    /* Positioned below the header */
    bottom: calc(8 * var(--ws-unit, 1px));
    width: calc(6 * var(--ws-unit, 1px));
    background-color: transparent;
    z-index: 10;
    pointer-events: auto;
}

.hub_stack_card .custom-scrollbar-thumb {
    position: absolute;
    right: 0;
    top: 0;
    width: calc(3 * var(--ws-unit, 1px));
    background-color: rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.2);
    border-radius: calc(3 * var(--ws-unit, 1px));
    transition: width 0.2s ease, background-color 0.2s ease;
}

.hub_stack_card .custom-scrollbar-track:hover .custom-scrollbar-thumb,
.hub_stack_card .custom-scrollbar-thumb.scrolling {
    width: calc(6 * var(--ws-unit, 1px));
    background-color: rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.45);
}

/* Horizontal File Row */
.hub_file_row {
    position: relative;
    display: flex;
    align-items: center;
    padding: calc(10 * var(--ws-unit, 1px)) calc(12 * var(--ws-unit, 1px));
    background: rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.02);
    border: calc(1 * var(--ws-unit, 1px)) solid rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.05);
    border-radius: calc(10 * var(--ws-unit, 1px));
    transition: all 0.25s ease;
    gap: calc(12 * var(--ws-unit, 1px));
}

.hub_file_row:hover {
    background: rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.04);
    border-color: rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.08);
}

.hub_file_row.completed {
    border-color: rgba(16, 185, 129, 0.25);
    background: rgba(16, 185, 129, 0.02);
}

.hub_file_row.failed {
    border-color: rgba(239, 68, 68, 0.25);
    background: rgba(239, 68, 68, 0.02);
}

.hub_file_row.cancelled {
    border-color: rgba(156, 163, 175, 0.15);
    opacity: 0.5;
}

.hub_row_icon {
    font-size: calc(18 * var(--ws-unit, 1px));
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(28 * var(--ws-unit, 1px));
    height: calc(28 * var(--ws-unit, 1px));
    border-radius: calc(6 * var(--ws-unit, 1px));
    background: rgba(59, 130, 246, 0.1);
    color: var(--theme-info-text, #3b82f6);
    flex-shrink: 0;
}

.hub_row_icon.zip {
    background: rgba(139, 92, 246, 0.1);
    color: var(--theme-accent-text, #8b5cf6);
}

.hub_row_icon.video {
    background: rgba(239, 68, 68, 0.1);
    color: var(--theme-danger-text, #ef4444);
}

.hub_row_icon.audio {
    background: rgba(16, 185, 129, 0.1);
    color: var(--theme-success-text, #10b981);
}

.hub_row_icon.photo {
    background: rgba(245, 158, 11, 0.1);
    color: var(--theme-warning-text, #f59e0b);
}

.hub_row_icon.document {
    background: rgba(16, 185, 129, 0.1);
    color: var(--theme-success-text, #10b981);
}

.hub_row_icon.other {
    background: rgba(59, 130, 246, 0.1);
    color: var(--theme-info-text, #3b82f6);
}

.hub_row_icon.fail {
    background: rgba(239, 68, 68, 0.1);
    color: var(--theme-danger-text, #ef4444);
}

.hub_row_icon.dir {
    background: rgba(245, 158, 11, 0.1);
    color: var(--theme-warning-text, #f59e0b);
}

.hub_row_name {
    flex: 1;
    font-size: var(--font-size-base, calc(14 * var(--ws-unit, 1px)));
    color: var(--theme-text-primary, #e2e8f0);
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    user-select: none;
}

.hub_row_count {
    font-size: var(--font-size-sm, calc(12 * var(--ws-unit, 1px)));
    color: var(--theme-text-secondary, rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.6));
    margin-left: calc(8 * var(--ws-unit, 1px));
    margin-right: calc(8 * var(--ws-unit, 1px));
    white-space: nowrap;
    flex-shrink: 0;
}

.hub_row_progress_area {
    position: relative;
    width: calc(24 * var(--ws-unit, 1px));
    height: calc(24 * var(--ws-unit, 1px));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hub_row_svg {
    width: calc(24 * var(--ws-unit, 1px));
    height: calc(24 * var(--ws-unit, 1px));
    transform: rotate(-90deg);
}

.hub_row_track {
    fill: none;
    stroke: rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.04);
    stroke-width: 2.5;
}

.hub_row_bar {
    fill: none;
    stroke: #3b82f6;
    /* 파란색 진행바 */
    stroke-width: 2.5;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.1s linear;
}

.hub_row_status_icon {
    font-size: calc(11 * var(--ws-unit, 1px));
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(16 * var(--ws-unit, 1px));
    height: calc(16 * var(--ws-unit, 1px));
    border-radius: 50%;
    color: #ffffff;
}

.hub_row_status_icon.completed {
    color: var(--theme-success-text, #10b981);
}

/* Go to folder button style for completed uploads */
.hub_row_go_btn {
    display: none;
    cursor: pointer;
    width: calc(16 * var(--ws-unit, 1px));
    height: calc(16 * var(--ws-unit, 1px));
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.hub_row_go_btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.hub_row_go_btn:hover img {
    opacity: 1;
}

.hub_row_go_btn:active {
    transform: scale(0.9);
}

/* Hover effect: hide checkmark, show go to folder library button */
.hub_file_row.completed .hub_row_progress_area:hover .hub_row_status_icon.completed {
    display: none;
}

.hub_file_row.completed .hub_row_progress_area:hover .hub_row_go_btn {
    display: flex;
}

.hub_row_status_icon.failed {
    color: var(--theme-danger-text, #ef4444);
}

.hub_row_status_icon.cancelled {
    color: var(--theme-text-secondary, #9ca3af);
}

.hub_row_cancel_btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(var(--theme-surface-rgb, 30, 30, 45), 0.85);
    border: none;
    color: var(--theme-danger-text, #ef4444);
    font-size: calc(13 * var(--ws-unit, 1px));
    font-weight: bold;
    width: calc(20 * var(--ws-unit, 1px));
    height: calc(20 * var(--ws-unit, 1px));
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 5;
}

.hub_row_progress_area:hover .hub_row_cancel_btn {
    opacity: 1;
}

.hub_row_cancel_btn:hover {
    background: #ef4444;
    color: #ffffff;
}

/* Common Control / Close Button in Headers */
.hub_control_btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(4 * var(--ws-unit, 1px));
    border-radius: 50%;
    transition: all 0.2s;
    width: calc(24 * var(--ws-unit, 1px));
    height: calc(24 * var(--ws-unit, 1px));
}

.hub_control_btn:hover {
    background: rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.08);
}

.hub_control_icon {
    width: calc(12 * var(--ws-unit, 1px));
    height: calc(12 * var(--ws-unit, 1px));
    object-fit: contain;
    opacity: 0.65;
    transition: opacity 0.2s, transform 0.2s;
    display: block;
}

.hub_control_btn:hover .hub_control_icon {
    opacity: 1;
    transform: scale(1.1);
}

/* Empty State styling inside upload list */
.hub_empty_state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: calc(24 * var(--ws-unit, 1px)) calc(12 * var(--ws-unit, 1px));
}

.hub_empty_icon {
    font-size: calc(28 * var(--ws-unit, 1px));
    margin-bottom: calc(8 * var(--ws-unit, 1px));
    opacity: 0.8;
}

.hub_empty_title {
    font-size: calc(13 * var(--ws-unit, 1px));
    font-weight: 600;
    color: var(--theme-text-emphasis, #ffffff);
    margin: 0 0 calc(4 * var(--ws-unit, 1px)) 0;
}

.hub_empty_subtitle {
    font-size: calc(11 * var(--ws-unit, 1px));
    color: var(--theme-text-secondary, #a0a0b0);
    margin: 0;
    line-height: 1.4;
}

/* Drag & Drop Area highlight */
#library_drive_file_list.drag-over-highlight {
    background: rgba(139, 92, 246, 0.05) !important;
    border: calc(2 * var(--ws-unit, 1px)) dashed rgba(139, 92, 246, 0.4) !important;
    border-radius: calc(8 * var(--ws-unit, 1px));
}

/* --- Notification Stack & Card Styles --- */
.hub_notice_stack {
    position: relative;
    margin-bottom: 0px;
    width: 100%;
}

/* 다중 알림 스택의 겹친 카드 효과 (기본 선언) */
.hub_notice_stack.multi-stack::before,
.hub_notice_stack.multi-stack::after {
    content: '';
    position: absolute;
    height: 100%;
    background: transparent;
    backdrop-filter: blur(calc(20 * var(--ws-unit, 1px)));
    -webkit-backdrop-filter: blur(calc(20 * var(--ws-unit, 1px)));
    border: calc(1 * var(--ws-unit, 1px)) solid rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.07);
    border-radius: calc(12 * var(--ws-unit, 1px));
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.3s ease, transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 calc(4 * var(--ws-unit, 1px)) calc(15 * var(--ws-unit, 1px)) var(--theme-shadow, rgba(0, 0, 0, 0.25));
}

/* 접힌 상태에서의 뒷카드 오프셋 */
.hub_notice_stack.multi-stack::before {
    left: calc(8 * var(--ws-unit, 1px));
    right: calc(8 * var(--ws-unit, 1px));
    bottom: calc(-6 * var(--ws-unit, 1px));
    z-index: -1;
    opacity: 0.9;
}

.hub_notice_stack.multi-stack::after {
    left: calc(16 * var(--ws-unit, 1px));
    right: calc(16 * var(--ws-unit, 1px));
    bottom: calc(-12 * var(--ws-unit, 1px));
    z-index: -2;
    opacity: 0.7;
}

/* 마우스 오버 시 입체감 효과 (접힌 상태일 때만) */
.hub_notice_stack.multi-stack.collapsed-stack:hover::before {
    bottom: calc(-8 * var(--ws-unit, 1px));
    background: transparent;
}

.hub_notice_stack.multi-stack.collapsed-stack:hover::after {
    bottom: calc(-15 * var(--ws-unit, 1px));
    background: transparent;
}

/* 펼쳐진 상태에서의 겹친 카드 페이드 아웃 및 슬라이딩 다운 */
.hub_notice_stack.multi-stack.expanded-stack::before,
.hub_notice_stack.multi-stack.expanded-stack::after {
    opacity: 0 !important;
    transform: translateY(calc(10 * var(--ws-unit, 1px))) !important;
}

/* 스택 자체 마진 트랜지션 */
.hub_notice_stack.multi-stack {
    transition: margin-bottom 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.hub_notice_stack.multi-stack.collapsed-stack {
    margin-bottom: calc(12 * var(--ws-unit, 1px));
}

.hub_notice_stack.multi-stack.expanded-stack {
    margin-bottom: 0px;
}

/* 접힌 상태의 최신 카드 스타일 및 트랜지션 */
.hub_notice_stack.multi-stack .latest-card {
    transition: max-height 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
        opacity 0.3s ease,
        transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
        padding 0.4s ease,
        margin 0.4s ease,
        border-width 0.4s ease;
    overflow: hidden;
    max-height: calc(150 * var(--ws-unit, 1px));
    opacity: 1;
    transform: translateY(0);
}

.hub_notice_stack.multi-stack.expanded-stack .latest-card {
    max-height: 0 !important;
    opacity: 0 !important;
    transform: translateY(calc(20 * var(--ws-unit, 1px))) !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border-top-width: 0 !important;
    border-bottom-width: 0 !important;
}

/* 펼쳐진 상태의 헤더 및 리스트 스타일 및 트랜지션 */
.hub_notice_stack.multi-stack .hub_notice_expanded_content {
    transition: max-height 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
        opacity 0.3s ease,
        transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(calc(-20 * var(--ws-unit, 1px)));
}

.hub_notice_stack.multi-stack.expanded-stack .hub_notice_expanded_content {
    max-height: calc(800 * var(--ws-unit, 1px));
    opacity: 1;
    transform: translateY(0);
}

/* 펼쳐진 리스트 내부 카드들 사이 간격 */
.hub_notice_list {
    display: flex;
    flex-direction: column;
    gap: calc(8 * var(--ws-unit, 1px));
    width: 100%;
}

/* 개별 알림 카드 디자인 (UGREEN AI 스타일) */
.hub_notice_card {
    background: transparent;
    backdrop-filter: blur(calc(16 * var(--ws-unit, 1px)));
    -webkit-backdrop-filter: blur(calc(16 * var(--ws-unit, 1px)));
    border: calc(1 * var(--ws-unit, 1px)) solid rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.06);
    border-radius: calc(12 * var(--ws-unit, 1px));
    padding: calc(12 * var(--ws-unit, 1px));
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: calc(12 * var(--ws-unit, 1px));
    transition: all 0.25s ease;
    cursor: pointer;
    position: relative;
    box-shadow: 0 calc(4 * var(--ws-unit, 1px)) calc(12 * var(--ws-unit, 1px)) var(--theme-shadow, rgba(0, 0, 0, 0.1));
    width: 100%;
    box-sizing: border-box;
}

.hub_unread_dot {
    position: absolute;
    top: 0px;
    left: 0px;
    width: calc(6 * var(--ws-unit, 1px));
    height: calc(6 * var(--ws-unit, 1px));
    border-radius: 50%;
    background-color: #8B5CF6;
    box-shadow: 0 0 calc(6 * var(--ws-unit, 1px)) #8B5CF6;
    z-index: 10;
}

.hub_notice_card:hover {
    background: rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.03);
    border-color: rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.12);
    transform: translateY(calc(-1 * var(--ws-unit, 1px)));
}

.hub_notice_card .hub_card_left {
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(36 * var(--ws-unit, 1px));
    height: calc(36 * var(--ws-unit, 1px));
    border-radius: calc(10 * var(--ws-unit, 1px));
    background: rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.04);
    font-size: calc(20 * var(--ws-unit, 1px));
    flex-shrink: 0;
}

/* 카테고리별 특화 배경 및 글로우 효과 */
.hub_notice_card.ugreen-ai-card .hub_card_left {
    background: rgba(139, 92, 246, 0.12);
    border: calc(1 * var(--ws-unit, 1px)) solid rgba(139, 92, 246, 0.25);
    color: var(--theme-accent-text, #a78bfa);
}

.hub_notice_card.control-card .hub_card_left {
    background: rgba(59, 130, 246, 0.12);
    border: calc(1 * var(--ws-unit, 1px)) solid rgba(59, 130, 246, 0.25);
    color: var(--theme-info-text, #60a5fa);
}

.hub_notice_card.storage-card .hub_card_left {
    background: rgba(16, 185, 129, 0.12);
    border: calc(1 * var(--ws-unit, 1px)) solid rgba(16, 185, 129, 0.25);
    color: var(--theme-success-text, #34d399);
}

.hub_notice_card.docker-card .hub_card_left {
    background: rgba(245, 158, 11, 0.12);
    border: calc(1 * var(--ws-unit, 1px)) solid rgba(245, 158, 11, 0.25);
    color: var(--theme-warning-text, #fbbf24);
}

.hub_notice_card .hub_card_right {
    display: flex;
    flex-direction: column;
    gap: calc(3 * var(--ws-unit, 1px));
    flex: 1;
    min-width: 0;
}

.hub_notice_card .hub_card_header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    margin-top: calc(-2 * var(--ws-unit, 1px));
}

.hub_notice_card .hub_card_title {
    font-size: var(--font-size-base, calc(14 * var(--ws-unit, 1px)));
    font-weight: 600;
    color: var(--theme-text-emphasis, #f1f5f9);
}

.hub_notice_card .hub_card_time {
    font-size: var(--font-size-sm, calc(12 * var(--ws-unit, 1px)));
    color: var(--theme-text-secondary, #94a3b8);
    font-weight: 500;
    opacity: 0.8;
}

.hub_notice_card .hub_card_time_container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: calc(60 * var(--ws-unit, 1px));
    height: calc(14 * var(--ws-unit, 1px));
}

.hub_notice_card .hub_card_delete_btn {
    display: none;
    background: none;
    border: none;
    color: var(--theme-text-secondary, #94a3b8);
    font-size: calc(14 * var(--ws-unit, 1px));
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s ease;
}

.hub_notice_card .hub_card_delete_btn:hover {
    color: var(--theme-danger-text, #ef4444);
}

.hub_notice_card:hover .hub_card_time {
    display: none;
}

.hub_notice_card:hover .hub_card_delete_btn {
    display: inline-block;
}

.hub_notice_empty_state {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--theme-text-secondary, #94a3b8);
    font-size: calc(13 * var(--ws-unit, 1px));
    font-weight: 500;
    text-align: center;
    user-select: none;
    box-sizing: border-box;
}

.hub_notice_card .hub_card_desc {
    font-size: var(--font-size-sm, calc(12 * var(--ws-unit, 1px)));
    color: var(--theme-text-primary, #cbd5e1);
    margin: 0;
    line-height: 1.4;
    word-break: keep-all;
}



/* 접기 버튼 디자인 (이미지의 '접기'와 흡사한 세련된 타원형 알약 버튼) */
.hub_notice_fold_btn_wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: calc(10 * var(--ws-unit, 1px));
    margin-bottom: calc(6 * var(--ws-unit, 1px));
}

.hub_notice_fold_btn {
    background: rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.08);
    border: calc(1 * var(--ws-unit, 1px)) solid rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.12);
    color: var(--theme-text-primary, #cbd5e1);
    font-size: calc(10 * var(--ws-unit, 1px));
    font-weight: 600;
    padding: calc(4 * var(--ws-unit, 1px)) calc(14 * var(--ws-unit, 1px));
    border-radius: calc(12 * var(--ws-unit, 1px));
    cursor: pointer;
    transition: all 0.2s ease;
}

/* 펼쳐진 알림 그룹의 헤더 영역 */
.hub_notice_expanded_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: calc(2 * var(--ws-unit, 1px)) calc(4 * var(--ws-unit, 1px)) calc(10 * var(--ws-unit, 1px)) calc(4 * var(--ws-unit, 1px));
    width: 100%;
    box-sizing: border-box;
}

.hub_notice_expanded_title {
    font-size: var(--font-size-base, calc(14 * var(--ws-unit, 1px)));
    font-weight: 700;
    color: var(--theme-text-emphasis, #ffffff);
    user-select: none;
}

.hub_notice_expanded_actions {
    display: flex;
    gap: calc(8 * var(--ws-unit, 1px));
    align-items: center;
}

/* 동그란 액션 버튼 스타일 (이미지 속 회색 투명 원형 버튼) */
.hub_notice_action_btn {
    background: rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.1);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(22 * var(--ws-unit, 1px));
    height: calc(22 * var(--ws-unit, 1px));
    border-radius: 50%;
    transition: all 0.2s ease;
    padding: 0;
}

.hub_notice_action_btn:hover {
    background: rgba(var(--theme-foreground-rgb, 255, 255, 255), 0.2);
    transform: scale(1.08);
}

.hub_notice_action_btn img {
    width: calc(10 * var(--ws-unit, 1px));
    height: calc(10 * var(--ws-unit, 1px));
    opacity: 0.85;
    transition: opacity 0.2s;
    display: block;
}

.hub_notice_action_btn:hover img {
    opacity: 1;
}

/* down_W 이미지를 180도 회전하여 위 화살표(^)로 활용 */
.hub_notice_action_btn.fold-btn img {
    transform: rotate(180deg);
}

/* 분류 헤더는 접힘 상태와 관계없이 카드 위에 남긴다. */
.hub_notice_group { --hub-group-header-size: calc(34 * var(--ws-unit, 1px)); }
.hub_notice_group > .hub_notice_expanded_header { min-height:var(--hub-group-header-size); }
.hub_notice_group.multi-stack::before,
.hub_notice_group.multi-stack::after { height:calc(100% - var(--hub-group-header-size)); }
.hub_notice_group.multi-stack[data-count="2"]::after { content:none; }
.hub_notice_group > .hub_unread_dot { top:var(--hub-group-header-size); }
.hub_notice_group.collapsed-stack > .hub_notice_expanded_header .fold-btn img { transform:rotate(0deg); }

/* 카드 미리보기는 한 줄로, 펼친 본문은 줄바꿈을 보존해 전체 표시한다. */
.hub_notice_group .hub_notice_card .hub_card_desc {
    display:block;
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap; overflow-wrap:anywhere;
}
.hub_notice_group .hub_notice_card.body-expanded .hub_card_desc {
    display:block; -webkit-line-clamp:unset; overflow:visible; white-space:pre-wrap;
}
.hub_notice_loading_line {
    display:block; width:90%; height:.8em; margin:.35em 0; border-radius:9999px;
    background:currentColor; opacity:.18; animation:hub-notice-body-pulse 2.2s cubic-bezier(.45,0,.55,1) infinite;
}
.hub_notice_loading_line:last-child { width:65%; }
@keyframes hub-notice-body-pulse { 0%,100% { opacity:.18; } 50% { opacity:.5; } }
@media(prefers-reduced-motion:reduce) { .hub_notice_loading_line { animation:none; opacity:.3; } }
