.tbs-guide-button {
    position: fixed;
    right: 22px !important;
    bottom: 22px !important;
    left: auto !important;
    top: auto !important;
    width: 96px;
    height: 96px;
    border: 0;
    background: transparent url('/core/tb-s-aide.png') center center / contain no-repeat;
    cursor: pointer;
    z-index: 2147483644;
    padding: 0;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.22));
}

.tbs-guide-button img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.2s ease;
    display: block;
}

.tbs-guide-button:hover img {
    transform: translateY(-3px) scale(1.02);
}

.tbs-guide-overlay {
    position: fixed;
    inset: 0;
    background: rgba(7, 15, 30, 0.28);
    z-index: 2147483645;
    display: none;
}

.tbs-guide-overlay.is-open {
    display: block;
}

.tbs-guide-box {
    position: fixed;
    right: 24px !important;
    bottom: 136px !important;
    left: auto !important;
    top: auto !important;
    width: min(420px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    max-height: min(78vh, 720px);
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.22);
    z-index: 2147483646;
    display: none;
    overflow: hidden;
}

.tbs-guide-box.is-open {
    display: block;
}

.tbs-guide-header {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 18px 18px 10px;
}

.tbs-guide-avatar {
    width: 84px;
    height: 84px;
    object-fit: contain;
    flex: 0 0 auto;
    display: block;
}

.tbs-guide-title {
    margin: 0;
    color: #0f172a;
    font-size: 1.15rem;
    font-weight: 800;
}

.tbs-guide-counter {
    margin-top: 4px;
    color: #64748b;
    font-size: 0.9rem;
}

.tbs-guide-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: #eef2ff;
    color: #1e293b;
    font-size: 1.1rem;
    cursor: pointer;
}

.tbs-guide-content {
    padding: 0 18px 18px;
    max-height: calc(min(78vh, 720px) - 110px);
    overflow: auto;
}

.tbs-guide-text {
    color: #334155;
    line-height: 1.55;
    font-size: 0.98rem;
    min-height: 90px;
}

.tbs-guide-actions {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
}

.tbs-guide-nav {
    display: flex;
    gap: 8px;
}

.tbs-guide-btn {
    border: 0;
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer;
}

.tbs-guide-btn.primary {
    background: #0f172a;
    color: #fff;
}

.tbs-guide-btn.secondary {
    background: #e2e8f0;
    color: #0f172a;
}

.tbs-guide-btn.link {
    background: transparent;
    color: #475569;
}

.tbs-guide-highlight {
    position: relative;
    z-index: 2147483643 !important;
    outline: 5px solid rgba(255, 255, 255, 0.98);
    outline-offset: 3px;
    box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.55), 0 0 32px rgba(59, 130, 246, 0.85), 0 0 0 9999px rgba(7, 15, 30, 0.28);
    border-radius: 14px;
    transition: box-shadow 0.2s ease;
    animation: tbsGuidePulse 1.35s ease-in-out infinite;
}

#dashboardQuickAction.tbs-guide-highlight {
    outline: 4px solid rgba(255, 255, 255, 0.96);
    outline-offset: 4px;
    box-shadow: 0 0 0 10px rgba(59, 130, 246, 0.5), 0 0 38px rgba(59, 130, 246, 0.95), 0 0 0 9999px rgba(7, 15, 30, 0.28), 0 18px 30px rgba(0, 0, 0, 0.22);
}

@keyframes tbsGuidePulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.01);
    }
    100% {
        transform: scale(1);
    }
}

@media (max-width: 640px) {
    .tbs-guide-button {
        width: 82px;
        height: 82px;
        right: 14px;
        bottom: 14px;
    }

    .tbs-guide-box {
        right: 12px;
        left: 12px;
        bottom: 106px;
        width: auto;
    }
}
